
...
. We return the object, including only the
elements with names matched from ...
.
extract(x, ...)
names
attribute.dat
.name
s passed to ...
are not evaluated
directly; rather, their character representation is taken
and used for extraction.
without
, extract.re
dat <- data.frame( x = c(1, 2, 3), y = c("a", "b", "c"), z=c(4, 5, 6) )
## all of these return identical output
dat[ names(dat) %in% c("x","z") ]
extract( dat, x, z)
Run the code above in your browser using DataLab