# NOT RUN {
set.seed(1)
Describe(rnorm(1000000), plot=TRUE)
Describe(airquality)
Describe(airquality, plot=TRUE, upper.triangle=TRUE, upper.smooth="lm")
# ?psych::bfi
Describe(bfi[c("age", "gender", "education")])
d=as.data.table(psych::bfi)
d[,`:=`(
gender=as.factor(gender),
education=as.factor(education),
E=MEAN(d, "E", 1:5, rev=c(1,2), likert=1:6),
A=MEAN(d, "A", 1:5, rev=1, likert=1:6),
C=MEAN(d, "C", 1:5, rev=c(4,5), likert=1:6),
N=MEAN(d, "N", 1:5, likert=1:6),
O=MEAN(d, "O", 1:5, rev=c(2,5), likert=1:6)
)]
Describe(d[,.(age, gender, education)], plot=TRUE, all.as.numeric=FALSE)
Describe(d[,.(age, gender, education, E, A, C, N, O)], plot=TRUE)
# }
Run the code above in your browser using DataLab