|
a |
|
b/man/whichInGrob.Rd |
|
|
1 |
\name{whichInGrob} |
|
|
2 |
\alias{whichInGrob} |
|
|
3 |
\title{ |
|
|
4 |
Return indices of layers of interest from the grob object |
|
|
5 |
} |
|
|
6 |
\description{ |
|
|
7 |
The function matches the supplied vector of grob's layer names to the grob object and returns the indices of those layer names. |
|
|
8 |
} |
|
|
9 |
\usage{ |
|
|
10 |
whichInGrob(grob, layer) |
|
|
11 |
} |
|
|
12 |
\arguments{ |
|
|
13 |
\item{grob}{grob} |
|
|
14 |
\item{layer}{character vector} |
|
|
15 |
} |
|
|
16 |
\details{ |
|
|
17 |
If the layer doesn't exist the function returns NA. |
|
|
18 |
} |
|
|
19 |
\value{ |
|
|
20 |
numeric vector |
|
|
21 |
} |
|
|
22 |
\author{ |
|
|
23 |
Małgorzata Oleś <dr.malgorzata.oles@gmail.com> |
|
|
24 |
} |
|
|
25 |
\examples{ |
|
|
26 |
library("ggplot2") |
|
|
27 |
gg = ggplotGrob(qplot(1,1)) |
|
|
28 |
whichInGrob(gg, "xlab-b") |
|
|
29 |
whichInGrob(gg, c("xlab-b","panel")) |
|
|
30 |
} |