stacomirtools (version 0.5.3)

killfactor: very usefull function remove factor that appear, noticeably after loading with 'ODBC'

Description

function used to remove factors that appear, noticeably after loading with 'ODBC'

Usage

killfactor(df)

Arguments

df

a data.frame

Value

df

Examples

Run this code
# NOT RUN {
df <- data.frame("var1" = c("blue","red"),"var2"=c("nice","ugly"))
df[,"var1"] <- as.factor(df[,"var1"])
df[,"var2"] <- as.factor(df[,"var2"])
df <- killfactor(df)
apply(df,1,function(x) is.factor(x)) # FALSE FALSE
# }

Run the code above in your browser using DataCamp Workspace