Can I use R attributes to save physical units?

code-readability, constants, r, units-of-measurement

Solution

You can, with this code:

attributes(epsilon0) <- list(name = "electric constant", source = "CODATA", unit="F m-1")

Problem

Can I (should I) use R attributes to save physical units and similar information as hint for the user? ``` epsilon0 <- 8.854188e-12 # name <- "electric constant" # source <- "CODATA" # unit <- "F m-1" ```

Original source