
Last chance! 50% off unlimited learning
Sale ends in
maxlevels(data, maxlevels = 20, na.omit = TRUE)
Character strings are treated as factors although they keep their datatype. Numeric data is left untouched. If data contains unused factor levels (e.g. due to subsetting) these are ignored and a warning is given.
OneR
df <- data.frame(numeric = c(1:26), alphabet = letters)
str(df)
str(maxlevels(df))
Run the code above in your browser using DataLab