Empty category in box plot

df <- data.frame(length=1:100,
                 year=c(rep(1980, 20), rep(1981, 20), rep(1983, 20), rep(1984, 20), rep(1985, 20)))
boxplot(length ~ year, df)



# Not good !

df$year <- factor(df$year,  levels = 1980:1985)
boxplot(length ~ year, df)


Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04