Description Slots Author(s) See Also
The VariableDef class is used to store properly the definition of the variable.
varlabelA 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.
descriptionA length-one character vector. Description of the variable.
rnameA 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].
commentA 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.
typeA 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.
unitA 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).
levelsA 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.
labelsA character vector of the same size than levels or empty. If empty, the labels will be the levels.
originalnameA 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.