Forums | OpenR
OpenR: R & Statistics
/
question about layout function
Posts: 2
13 March 2023, 6:06 PM
mymat1 <- matrix(c(1,3:5),nrow = 2)
layout(mat = mymat1,widths = c(1,1,2),heights = c(1,2))
plot(airquality$Solar.R, airquality$Ozone)
hist(airquality$Solar.R)
barplot(airquality$Month)
plot(airquality$Solar.R, airquality$Ozone)
--------
above is my code, and I find that there exists a mistake that "格式矩阵至少要对{1 ... 5}里每一个值都有参考值" when running the second line.
what does it mean? what is "matrix(c(1,3:5))" stand for?
Posts: 128
13 March 2023, 8:32 PM
I don't think you can skip 2 from c(1, 3:5), and you give 3 widths for 2 columns.
3 results