[R] levels

andy elprama @ndy@e|pr@m@ @end|ng |rom gm@||@com
Wed Jul 15 10:31:06 CEST 2020


Dear R-users,

Something strange happened within the command "levels"

R version 3.6.1
name <- c("a","b","c")
values <- c(1,2,3)
data <- data.frame(name,values)
levels(data$name)
[1] "a" "b" "c"

R version 4.0
name <- c("a","b","c")
values <- c(1,2,3)
data <- data.frame(name,values)
levels(data$name)
[1] NULL

What is happening here?

	[[alternative HTML version deleted]]



More information about the R-help mailing list