This function takes as input an object of class plotSmooth
and
returns the names of all the possible visual layers that
could be used with that object.
listLayers(o)
o | an object of class |
---|
A vector containing the names of the available layers.
library(mgcViz) n <- 400 x1 <- rnorm(n) x2 <- rnorm(n) dat <- data.frame("x1" = x1, "x2" = x2, "y" = sin(x1) + 0.5 * x2^2 + rnorm(n)) b <- gam(y ~ x1+s(x2), data = dat, method = "REML") b <- getViz(b) # List layers available for parametric effect plot o <- plot( pterm(b, 1) ) listLayers(o)#> [1] "l_ciLine" "l_ciPoly" "l_dens2D" "l_fitDens" "l_fitLine" "l_points" #> [7] "l_rug"#> [1] "l_ciLine" "l_ciPoly" "l_dens2D" "l_fitDens" "l_fitLine" "l_points" #> [7] "l_rug" "l_simLine"#> [1] "l_dens2D" "l_densCheck" "l_gridCheck1D" "l_gridQCheck1D" #> [5] "l_points" "l_rug"