powered by
Add variable units to data.frame (or data.table).
Units(object, units)
The object augmented with attribute "units"
"units"
A data.frame or data.table
Named list of units. Names are variable names. If omitted, show existing units.
Thomas A. Gerds <tag@biostat.ku.dk>
If the object has units existing units are replaced by given units.
data(Diabetes) Diabetes <- Units(Diabetes,list(BMI="kg/m^2")) Units(Diabetes) Diabetes <- Units(Diabetes,list(bp.1s="mm Hg",bp.2s="mm Hg")) Units(Diabetes)
Run the code above in your browser using DataLab