Displaying 1 result from an estimated 1 matches for "newmodname".
2010 Mar 17
2
Retaining variable name in a function
Hi All,
Im interested in creating a function that will convert a variable within a
data.frame to a factor while retaining the original name (yes, I know that I
can just: var <-factor(var) but I need it as a function for other
purposes). e.g.:
# this was an attempt but fails.
facts <- function(meta, mod, modname = "spec") {
meta$mod <- factor(meta$mod)