knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) source("../R/test_data_generator.R")
The variables
worksheet acts as a reference sheet your project(s), by listing the variables you are using.
This vignette describes how the variables
worksheet is organized and how to find variables that you can transform. The How to guides provides examples of how to use the this.
Read the variables
worksheet
cat("There are", nrow(variables), "variables, grouped in", sum(!duplicated(variables$section)), "sections and", sum(!duplicated(variables$subject)), "subjects that are available for transformation.")
cat("You can search for variables in the table below. Try searching for the lab tests. There are", sum(variables$subject == "lab test"), "variables are in the lab test subject. Try sorting the subject column by clicking the up beside the `subject` heading: the top", sum(variables$subject == "lab test"), "rows of the table should show the lab tests variables:") as.character(variables[variables$subject == "lab test", "variable"])
library(DT) datatable(variables, filter = 'top', options = list(pageLength = 5))
variables.csv
sheet is organizedThere are 8 columns in this worksheet as follows:
variable: the name of the final transformed variable.
label: the shorthand label for the variable.
labelLong: a more detailed label for the variable.
section: the section where this variable could be found (i.e. demographic, lab test).
subject: what the variable pertains to (i.e. age, sex, cholestral concentration).
variableType: whether the final variable is categorical or continuous.
units: any units for the final variable.
databaseStart: the list of databases that contain the variable of interest
variableStart: the original names of the variables as they are listed in each respective database
Derived variables follow the same naming conventions as recoded variables when listed in variables
worksheet.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.