Skip to content
Prev 273206 / 398506 Next

Best method to add unit information to dataframe ?

On Mon, Oct 3, 2011 at 10:35 AM, bruno Piguet <bruno.piguet at gmail.com> wrote:
The Hmisc package has some support for this:

library(Hmisc)

DF <- data.frame(x, y, z)
units(DF$x) <- "my x units"
units(DF$y) <- "my y units"

units(DF$x)