Skip to content

Additional variables

Sido Haakma edited this page Sep 24, 2019 · 6 revisions

Work Package 3

You can specify another version of the data dictionary in the command you executed when you uploaded the dictionary concerning the LifeCycle variables.

library(lifecycleProject)
lc.login(hostname = 'https://my-own-opal.org', username = 'admin', password = 'my-pw')
lc.populate.core(cohort_id = 'dnbc', dict_version = '1_1', data_version = '1_0')

Version 1.1 contains the variables from WP3. Please check: changelog.

For uploading the data you can use the same reshape script as before, assuming your source file is a collection of the work package 1 en 3 variables.

library(lifecycleProject)
lc.login(hostname = 'https://my-own-opal.org', username = 'admin', password = 'my-pw')
lc.reshape.core(input_path = 'C:\MyDocuments\source_file.sav', input_format = 'SPSS')

Work Package 4, 5 and 6

The work packages 4, 5 and 6 are combined in three new tables:

  • 1_0_outcome_non_repeated
  • 1_0_outcome_monthly_repeated
  • 1_0_outcome_yearly_repeated

This can be uploaded by executing a different command:

library(lifecycleProject)
lc.login(hostname = 'https://my-own-opal.org', username = 'admin', password = 'my-pw')
lc.populate.outcome(cohort_id = 'dnbc', dict_version = '1_0', data_version = '1_0')

Reshaping works the same:

library(lifecycleProject)
lc.login(hostname = 'https://my-own-opal.org', username = 'admin', password = 'my-pw')
lc.reshape.outcome(input_path = 'C:\MyDocuments\source_file.sav', input_format = 'SPSS')