variable_definition_table: Definition of variables table

Description See Also

Description

The definition of variables table is a way to describe each variable from a database in a table where each line represent a variable, and each column one of its characteristic. The idea is to be explicit about each variable by describing these characteristics :

varlabel

An explicit name of the variable, but short enough to be displayed on figures and tables. Example : Date of birth or Creatinine Clearance

description

An explicit description of the variable, if the varlabel is not explicit enough. It helps the statistician to understand the meaning of the variable. Example : The Creatinine Clearance measured at the entry of the patient in the hospital

comment

An commentary to help the statistician. Example : This quantitative variable can't have value superior to 20.

unit

The unit of the variable, when applicable. For dates, put the format like in R. Example : for the Creatinine Clearance, ml/min, for the Date of birth, %d%m%Y

flevel

A level of a factor or ordered variable. Each level must be placed in a separated column. Then there are as much flevel as levels of the variable

flabel

A label of a factor or ordered variable. Each level must be placed in a separated column. Then there are as much flevel as levels of the variable

type

Class of the variable. Could be numeric, integer, factor, ordered, date, character or not_used

rname

The name of the variable in R. If not given, the varlabel will be used and transformed to a compatible name

See Also

To create a definition of variables table skeleton from a existing data.frame, use the descvars_skeleton function. To read a definition of variables table from a data.frame to a DatabaseDef object, use the import_vardef. Variable definition table could be used directly as a data.frame by create_script. A built-in example of a complete definition of variables table is the variables_description_bad_database that describes the bad_database.


jomuller/vartors documentation built on May 19, 2019, 7:26 p.m.