Merge additional variables from a data frame into a Lexis object.
# S3 method for Lexis
merge(x, y, id, by, ...)
A Lexis
object with additional columns taken from the
merged data frame.
an object of class Lexis
a data frame
the name of the variable in y
to use for matching
against the variable lex.id
in x
.
if matching is not done by id, a vector of variable names
common to both x
and y
optional arguments to be passed to merge.data.frame
Martyn Plummer
A Lexis
object can be considered as an augmented data frame
in which some variables are time-dependent variables representing
follow-up. The Lexis
function produces a minimal object
containing only these time-dependent variables. Additional variables
may be added to a Lexis
object using the merge
method.
merge.data.frame
, subset.Lexis