Description Slots Author(s) See Also
The VariableDef
class is used to store properly the definition of the variable.
varlabel
A length-one character vector. Should be with a max of 40 letters. All characters are allowed. Will be used to varlabel properly the plots and tables in output.
description
A length-one character vector. Description of the variable.
rname
A length-one character vector. Should be with a max of 16 letters. It's the name of the variable used in R. It could only use [a-z], [0-9] and "_" and must start with [a-z].
comment
A length-one character vector with a max of 1000 letters. It's a commentary that will appear when describing each variable and give some advices to the statistician to how to analyze this variable.
type
A length-one character vector. Must be one of the following : numeric, integer, factor, ordered, character, date or not_used. It's used to dispatch the script blocs regarding the type of the variable.
unit
A length-one character vector of max size 20. Should be the unit of a variable which will be showed in some graphs or the format of a date (by default %d/%m/%Y
).
levels
A character vector. Only used if type is factor or ordered. Describe the levels used. The same levels must be in the database, otherwise NA will be generated.
labels
A character vector of the same size than levels or empty. If empty, the labels will be the levels.
originalname
A character vector representing the name of the variable in the original data table. Have no restriction.
Joris Muller
The constructor is vardef. For several variables, see DatabaseDef-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.