Advanced plotting in R (part 1): formulas and lattice

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Thanks for the explanation. I have a question about boxplot using lattice. if I have the following set of data
par(mai = c(1, 1, 1, 1), omi = c(0, 0, 0, 0))
set.seed(591)
xx1 <- rnorm(20, mean = 3, sd = 3.6)
xx2 <- rpois(40, lambda = 3.5)
xx3 <- rchisq(31, df = 5, ncp = 0)
box1 <- boxplot(xx1, xx2, xx3, names = c("Group-1", "Group-2",
"Group-3"), cex = 0.7)


and I want to recreate this boxplot using lattice, can I write it as follow?:
set.seed(591)
xxx <- data.frame(xx1 <- rnorm(20, mean = 3, sd = 3.6),
xx2 <- rpois(40, lambda = 3.5),
xx3 <- rchisq(31, df = 5, ncp = 0))
print("xxx Dataframe")
xxx

bwplot(~ xxx, data = xx1, xx2, xx3, main = "all groups")

#I get an error in this part. I appreciate it if you can tell me how the code should look like after bwplot

Thank you

mercedehsasanpour