whichInGrob | R Documentation |
The function matches the supplied vector of grob's layer names to the grob object and returns the indices of those layer names.
whichInGrob(grob, layer)
grob |
grob |
layer |
character vector |
If the layer doesn't exist the function returns NA.
numeric vector
Małgorzata Oleś <malgorzata.oles@embl.de>
library("ggplot2")
gg = ggplotGrob(qplot(1,1))
whichInGrob(gg, "xlab-b")
whichInGrob(gg, c("xlab-b","panel"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.