library(knitr); library(rmdformats)
library(here); library(janitor); library(magrittr)
library(rms); library(broom)
# other packages as needed can go here
library(tidyverse)
Details, details.
Ingest your raw data here.
All cleaning and tidying goes here, leading to a single tibble in R. Be sure to explain what you’re doing and why you’re doing it. Do not show listings of the data as you clean it.
I expect you’ll use several subheadings here to help delineate tasks.
Here, you will list the tibble, after all cleaning is complete. Just list the tibble.
Do what we asked you to do in the instructions.
Now, save your tibble as an R data set (.Rds file, which you’ll also provide to us.)
See the instructions and be sure that your code book includes all necessary elements.
Here, to help you get started, is the example from the instructions.
Variable | Role | Type | Description |
---|---|---|---|
subjectID |
identifier | - | character code for subjects |
sysbp |
outcome | quant | Most Recent Systolic Blood Pressure, in mm Hg |
statin |
input | 2-cat | Has a current statin prescription? (Yes or No) |
Here’s where you would run describe
from Hmisc
.
Follow the instructions.
Follow the instructions.
Follow the instructions.
Follow the instructions.
Be sure to include the text provided in the instructions.
Note that for Task 2 (Analyses and Presentation), we will add in sections called:
before the Affirmation but otherwise leave the template alone.
If you are including references, here’s the place for them. You should likely be providing a reference for your data set, at least.
xfun::session_info()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Locale:
LC_COLLATE=English_United States.1252
LC_CTYPE=English_United States.1252
LC_MONETARY=English_United States.1252
LC_NUMERIC=C
LC_TIME=English_United States.1252
Package version:
askpass_1.1 assertthat_0.2.1 backports_1.2.1
base64enc_0.1-3 BH_1.75.0.0 blob_1.2.1
bookdown_0.21 brio_1.1.1 broom_0.7.3
callr_3.5.1 cellranger_1.1.0 checkmate_2.0.0
cli_2.2.0 clipr_0.7.1 cluster_2.1.0
codetools_0.2-16 colorspace_2.0-0 compiler_4.0.3
conquer_1.0.2 cpp11_0.2.5 crayon_1.3.4
curl_4.3 data.table_1.13.6 DBI_1.1.1
dbplyr_2.0.0 desc_1.2.0 diffobj_0.3.3
digest_0.6.27 dplyr_1.0.3 ellipsis_0.3.1
evaluate_0.14 fansi_0.4.2 farver_2.0.3
forcats_0.5.1 foreign_0.8-81 Formula_1.2-4
fs_1.5.0 generics_0.1.0 ggplot2_3.3.3
glue_1.4.2 graphics_4.0.3 grDevices_4.0.3
grid_4.0.3 gridExtra_2.3 gtable_0.3.0
haven_2.3.1 here_1.0.1 highr_0.8
Hmisc_4.4-2 hms_1.0.0 htmlTable_2.1.0
htmltools_0.5.0 htmlwidgets_1.5.3 httr_1.4.2
isoband_0.2.3 janitor_2.1.0 jpeg_0.1-8.1
jsonlite_1.7.2 knitr_1.31 labeling_0.4.2
lattice_0.20-41 latticeExtra_0.6-29 lifecycle_0.2.0
lubridate_1.7.9.2 magrittr_2.0.1 markdown_1.1
MASS_7.3-53 Matrix_1.2-18 MatrixModels_0.4-1
matrixStats_0.57.0 methods_4.0.3 mgcv_1.8.33
mime_0.9 modelr_0.1.8 multcomp_1.4-15
[ reached getOption("max.print") -- omitted 65 entries ]