orivisit {simaerep} | R Documentation |
create orivisit object
Description
Internal S3 object, stores lazy reference to original visit data.
Usage
orivisit(df_visit, call = NULL, env = parent.frame())
Arguments
df_visit |
dataframe with original visit data |
call |
optional, provide call, Default: NULL |
env |
optional, provide environment of original visit data, Default: parent.frame() |
Details
Saves variable name of original visit data, checks whether it can be retrieved from parent environment and stores summary. Original data can be retrieved using as.data.frame(x).
Value
orivisit object
Examples
df_visit <- sim_test_data_study(
n_pat = 100,
n_sites = 5,
frac_site_with_ur = 0.4,
ur_rate = 0.6
)
df_visit$study_id <- "A"
visit <- orivisit(df_visit)
object.size(df_visit)
object.size(visit)
as.data.frame(visit)
[Package simaerep version 0.5.0 Index]