scoop {scope} | R Documentation |
For each vector of row.names in scope
, scoop()
will try to retrieve a value
from the specified column. If the vector contains exactly one row.name, the
corresponding value will be returned. Otherwise, NA is returned. If scope is
not specified, the specified column is returned.
scoop(x, this, scope = NULL, ...)
x |
A data frame. |
this |
A column name in x , from which values are taken. |
scope |
A scope object, ideally all elements atomic. |
... |
extra arguments, currently unused. |
A vector of same length as the data frame columns, and same mode as this
.
data(Theoph) #Consider earliest row for each Subject, and return 'conc'. S <- scope(Theoph,'Subject') S2 <-scope(Theoph,'Time',that=0,scope=S) any(score(S2)!=1) scoop(Theoph,'conc',scope=S2)