diff_secuTrial {secuTrialR}R Documentation

Returns differences in the setup of two secuTrialdata objects

Description

During ongoing studies it is possible that changes to the DataCapture interface are made. Sometimes these changes may call for adjustments in analysis code. It is considered good practice to run diff_secuTrial() on the last export and the current export of a project to at least make yourself aware of potential changes to the setup. If there are differences, the results of this function should be interpreted as a first indicator since they may not cover all alterations. Information is returned on new forms and variables. A detailed list of changes can be produced in the FormBuilder with "Compare project setup".

Usage

diff_secuTrial(x, y)

Arguments

x

a secuTrialdata object (the older export)

y

a secuTrialdata object (the newer export)

Value

If there are differences, diff_secuTrial() will produce a list of vectors. The fist vector informs about new forms and the second vector informs about new variables.

Examples

# read exports

# v1 is essentially a clone of the CTU05 setup
ctu06_v1 <- read_secuTrial(system.file("extdata", "sT_exports", "change_tracking",
                                       "s_export_CSV-xls_CTU06_version1.zip",
                                       package = "secuTrialR"))
# v2 contains 2 additional forms (mnpctu06anewform, mnpctu06anothernewform) and
# 2 additional variables (new_item_in_fu, new_item_in_new_form)
ctu06_v2 <- read_secuTrial(system.file("extdata", "sT_exports", "change_tracking",
                                       "s_export_CSV-xls_CTU06_version2.zip",
                                       package = "secuTrialR"))
# return diff
diff_secuTrial(ctu06_v1, ctu06_v2)


[Package secuTrialR version 1.3.3 Index]