0

I'm receiving an error "only 'grobs' allowed in "glist". Relatively new to R so I don't know what I'm doing wrong.

QQ PLOTS
qq_clump_thickness <- qqnorm(data$clump_thickness, main = "Clump Thickness")
qq_uniformity_of_cell_size <- qqnorm(data$uniformity_of_cell_size, main = 
"Uniformity of Cell Size")
qq_uniformity_of_cell_shape <- qqnorm(data$uniformity_of_cell_shape, main = 
"Uniformity of Cell Shape")
qq_marginal_adhesion <- qqnorm(data$marginal_adhesion, main = "Marginal 
Adhesion")
qq_single_epithelial_cell_size <- qqnorm(data$single_epithelial_cell_size, 
main = "Single Epithelial Cell Size")
qq_bare_nuclei <- qqnorm(data$bare_nuclei, main = "Bare Nuclei")
qq_bland_chromatin <- qqnorm(data$bland_chromatin, main = "Bland Chromatin")
qq_normal_nucleoli <- qqnorm(data$normal_nucleoli, main = "Normal Nucleoli")
qq_mitosis <- qqnorm(data$mitosis, main = "Mitosis")
qqimp <- grid.arrange(qq_clump_thickness, qq_uniformity_of_cell_size, 
qq_uniformity_of_cell_shape,
                  qq_marginal_adhesion, qq_single_epithelial_cell_size, 
qq_bare_nuclei, qq_bland_chromatin,
                  qq_normal_nucleoli, qq_mitosis,  top=textGrob("QQ Plots", 
gp=gpar(fontsize=15,font=1)))
Sql_Pete_Belfast
  • 570
  • 4
  • 23
  • 1
    `grid.arrange` expects objects of the types "grobs, gtables, ggplot or trellis objects", as per the docs. `qqnorm` uses base R graphics, so it doesn't return one of these types. There's a question [here](https://stackoverflow.com/q/48064819/5325862) that deals with something similar – camille May 10 '18 at 17:37
  • there is no need for grid graphics here. You can arrange multiple plots using `par(mfrow=c(nr, nc))` or `layout` – user20650 May 10 '18 at 19:35

0 Answers0