powered by
Add variable units to data.frame (or data.table).
Units(object, units)
A data.frame or data.table
Named list of units. Names are variable names. If omitted, show existing units.
The object augmented with attribute "units"
"units"
If the object has units existing units are replaced by given units.
# NOT RUN { 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