Description Usage Arguments Details Value Examples
Descriptions of fields (variables) in the Dipep dataset
1 | fields_prospect(df = master$screening, fields = fields)
|
df |
The data frame who's variables need describing |
fields |
A data frame that contains the information from the database specification
spreadsheet produced by Data Management. It should have a bare minimum of two
columns the 'Identifier' column (normally column D) and the 'Label' column
(usually column E) and these should be named |
Variable names are sometimes informative, sometimes cryptic. To avoid this each data frames variables are described using the database specification produced by Data Management.
Data frame of two columns, variable
listing the variables in the data frame
and description
which provides the description of the variable.
1 2 3 4 5 6 7 8 9 10 11 12 | ## You will need to download the 'fields' form from the Data Management database
## specification, read it in and rename columns appropriately.
fields <- <- read.csv('fields.csv')
fields <- dplyr::select(fields, Identifier, Label)
names(fields) <- c('variable', 'description')
## Finally because I work with '.' rather than '_' between words convert...
fields$variable <- gsub('_', '.', fields$variable)
## Save a description of your variables to a data frame that is part of alist of
## data frames (since there are multiple data frames in a given project)
README.variables <- list()
README.variables$screening <- fields_prospect(df = master$screening,
fields = fields)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.