| add_l2 {scan} | R Documentation |
Add level-2 data
Description
Merges variables with corresponding case names from a data.frame with an scdf file
Usage
add_l2(scdf, data_l2, cvar = "case")
Arguments
scdf |
A single-case data frame. See |
data_l2 |
A level 2 dataset. |
cvar |
Character string with the name of the "case" variable in the L2 dataset (default is 'case'). |
Details
This function is mostly used in combination with the hplm() function.
Value
An scdf
See Also
Other data manipulation functions:
as.data.frame.scdf(),
as_scdf(),
fill_missing(),
moving_median(),
outlier(),
ranks(),
scdf(),
select_cases(),
set_vars(),
shift(),
smooth_cases(),
standardize(),
truncate_phase()
Examples
Leidig2018 %>% add_l2(Leidig2018_l2)
[Package scan version 0.61.0 Index]