
list
/ data.frame
in a 'lazy' way. The first argument is the data frame,
while the second is passed and parsed from ...
. We
return the list
/ data.frame
, sans the
names matched from ...
.without(dat, ...)
list
or data.frame
object, or
other similar object with a names
attributedat
name
s passed to ...
are not
evaluated directly; rather, their character
representation is taken and used for extraction.
Furthermore, for a given item submitted, all text before
a $
is removed. First, symbols are parsed as characters, and named of
dat
are checked to see if they match any of
names(dat)
. If not, we try to find the variable in
the local search path, and match that against the names.
If none of these are successful, we throw an error.
extract
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") ) ]
without( dat, x, z)
without( dat, dat$x, dat$z )
Run the code above in your browser using DataLab