| CastorData-class | R Documentation |
Class used to access Castor REST API.
Class used to access Castor REST API.
An R6 class object.
getStudies(): Retries all Castor studies in account.
getFields(study_id, include, page): Gets all fields for a given
study.
getParticipants(study_id): Gets all participants for a given
study.
getStudyDataPoints(study_id, participant_id,
filter_types): Gets all data points
for a given study and participant. Filter types may be supplied for fields types
as a character vector of field types.
getStudyData(study_id,
load_study_data,
repeating_data_instances,
survey_instances,
translate_option_values,
filter_types):
creates a named nested list with a dataframe for all study data, a
list of dataframes for repeating data instances and a list of dataframes
for survey instances. Can toggle which data is extracted, and whether
option group values are translated to labels.
getOptionGroups(study_id): creates a data
frame with all option groups for a given study with each row representing an
option group.
getRepeatingDataInstancesByParticipant(study_id, participant_id): creates a data
frame with all repeating data for a given participant with each row
representing a field.
adjustTypes = function(field_to_type, values,
type_to_func): Utility method
for casting columns to their intended type. Users can supply their own list
of data type : function (for casting the data) mappings on instantiation of
this class, CastorAPIWrapper.
transformOptionGroups = function(dataframe, study_id): Utility method
for transforming a dataframe with option group values to the correct labels.
castoRedc::CastorAPIWrapper -> CastorData
castoRedc::CastorAPIWrapper$castorOAuth()castoRedc::CastorAPIWrapper$collectPages()castoRedc::CastorAPIWrapper$getField()castoRedc::CastorAPIWrapper$getFieldsPages()castoRedc::CastorAPIWrapper$getForm()castoRedc::CastorAPIWrapper$getFormsPages()castoRedc::CastorAPIWrapper$getParticipant()castoRedc::CastorAPIWrapper$getParticipantsPages()castoRedc::CastorAPIWrapper$getRepeatingData()castoRedc::CastorAPIWrapper$getRepeatingDataForm()castoRedc::CastorAPIWrapper$getRepeatingDataFormsPages()castoRedc::CastorAPIWrapper$getRepeatingDataInstanceMetadataPages()castoRedc::CastorAPIWrapper$getRepeatingDatasPages()castoRedc::CastorAPIWrapper$getRequest()castoRedc::CastorAPIWrapper$getStudiesPages()castoRedc::CastorAPIWrapper$getStudy()castoRedc::CastorAPIWrapper$getStudyDataPoint()castoRedc::CastorAPIWrapper$getStudyDataPointsPages()castoRedc::CastorAPIWrapper$getSurvey()castoRedc::CastorAPIWrapper$getSurveyPackage()castoRedc::CastorAPIWrapper$getSurveyPackageInstance()castoRedc::CastorAPIWrapper$getSurveyPackageInstancesPages()castoRedc::CastorAPIWrapper$getSurveyPackagesPages()castoRedc::CastorAPIWrapper$getSurveysPages()castoRedc::CastorAPIWrapper$getUsersPages()castoRedc::CastorAPIWrapper$getVisit()castoRedc::CastorAPIWrapper$getVisitsPages()castoRedc::CastorAPIWrapper$initialize()getStudies()CastorData$getStudies()
getUsers()CastorData$getUsers()
getForms()CastorData$getForms(study_id)
getFields()CastorData$getFields(study_id, include = "optiongroup")
getVisits()CastorData$getVisits(study_id)
getSurveys()CastorData$getSurveys(study_id, include = "forms", page = NULL)
getSurveyPackages()CastorData$getSurveyPackages(study_id)
getSurveyPackageInstances()CastorData$getSurveyPackageInstances(study_id)
getRepeatingDatas()CastorData$getRepeatingDatas(study_id)
getRepeatingDataForms()CastorData$getRepeatingDataForms(study_id)
getParticipants()CastorData$getParticipants(study_id, filter_archived = TRUE)
getStudyDataPointsBulkByParticipant()CastorData$getStudyDataPointsBulkByParticipant(study_id, participant_id)
getStudyDataPointsBulk()CastorData$getStudyDataPointsBulk(study_id_ = FALSE)
getOptionGroups()CastorData$getOptionGroups(study_id = FALSE)
getRepeatingDataInstancesByParticipant()CastorData$getRepeatingDataInstancesByParticipant(study_id, participant_id)
getRepeatingDataInstances()CastorData$getRepeatingDataInstances( study_id, participant_id = NULL, id_to_field_name = NULL )
getRepeatingDataInstancesBulk()CastorData$getRepeatingDataInstancesBulk( study_id_, participant_id_ = NULL, id_to_field_name_ = NULL, page_size = NULL )
getRepeatingDataInstanceMetadata()CastorData$getRepeatingDataInstanceMetadata(study_id)
getSurveyInstances()CastorData$getSurveyInstances( study_id, participant_id = NULL, id_to_field_name = NULL )
getSurveyInstancesBulk()CastorData$getSurveyInstancesBulk( study_id_, participant_id_ = NULL, id_to_field_name_ = NULL )
getSurveyInstanceBulk()CastorData$getSurveyInstanceBulk(study_id, participant_id, survey_instance_id)
getSurveyPackageInstanceBulk()CastorData$getSurveyPackageInstanceBulk( study_id, participant_id, survey_package_instance_id )
getStudyDataPoints()CastorData$getStudyDataPoints( study_id, participant_id = NULL, filter_types = NULL, bulk_by_participant = FALSE )
getStudyDataBulk()CastorData$getStudyDataBulk(study_id., field_info., participant_metadata)
getFieldInfo()CastorData$getFieldInfo(study_id)
generateFieldMetadata()CastorData$generateFieldMetadata(study_id, field_info)
getStudyData()CastorData$getStudyData(
study_id,
bulk = TRUE,
load_study_data = TRUE,
repeating_data_instances = TRUE,
survey_instances = TRUE,
translate_option_values = TRUE,
filter_types = c("remark", "image", "summary", "upload", "repeated_measures",
"add_repeating_data_button")
)generateCheckboxFields()CastorData$generateCheckboxFields(field_info, checkboxes = NULL)
adjustCheckboxFields()CastorData$adjustCheckboxFields(datapoints, field_info, checkbox_fields = NULL)
adjustTypes()CastorData$adjustTypes(study_data, field_metadata, type_to_func, filter_types)
transformOptionGroups()CastorData$transformOptionGroups(dataframe, study_id)
clone()The objects of this class are cloneable with this method.
CastorData$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.