Get the visit structure of secuTrialdata
objects
visit_structure(x, sorted = TRUE)
# S3 method for secuTrialvisit
plot(x, ...)
a secuTrialdata
object
logical if TRUE sorted by first visit
further parameters
data.frame with 1 for whether a form (rows) was collected during a particular visit (columns)
plot of the visit plan
Requires a fixed visit structure - an error will be returned for projects without a visit structure or one with flexible visits
export_location <- system.file("extdata", "sT_exports", "lnames",
"s_export_CSV-xls_CTU05_long_ref_miss_en_utf8.zip",
package = "secuTrialR")
# read all export data
sT_export <- read_secuTrial(data_dir = export_location)
#> Read export successfully.
#> The following export options deviate from the suggested specifications:
#> Data from hidden fields is part of the export.
#> Short names was not selected.
# get visit structure
vs <- visit_structure(sT_export)
# plot
plot(vs)