R/refactor.R

refactor <- function (df) 
{
    for (i in 1:ncol(df)) {
        if (is.factor(df[,i])) df[,i] <- factor(df[,i])
    }
    df
}

Try the labdsv package in your browser

Any scripts or data that you put into this service are public.

labdsv documentation built on April 10, 2023, 5:08 p.m.