get_new_submissions_odata: Download all missing instances through ODATA

Description Usage Arguments Value

View source: R/get_new_submissions_odata.R

Description

Just like the get_new_submissions function, this function finds and downloads all submissions which are already stored on ODK Central but not contained in the passed data. In contrast to its sister function, get_new_submissions_odata does not create a delta of instance ID's between old and new data to find the missing instances but it identifies the latest submission date in the old data and uses it to create ODATA query that filters for submissions that were either submitted or updated or both after this date. The new submissions can be returned by themselves or merged with the old data.

Usage

1
2
3
4
5
6
7
8
get_new_submissions_odata(
  csv = NULL,
  df = NULL,
  id_col,
  submission_date_col,
  merge_data = TRUE,
  force_timezone = TRUE
)

Arguments

csv

Character that specifies the path to the csv file that is to be read. (Either csv or df must not null)

df

Data frame that, specifies the data frame that is to be read. (Either csv or df must be null)

id_col

Character that specifies the exact name of the instance ID column in the df/csv.

submission_date_col

Character that specifies the exact name of the submission date column in the df/csv.

merge_data

Boolean that specifies whether the new data shall be merged with the one that was given or not.

force_timezone

If TRUE all time stamp values will be remain the same but their timezone will be changed to the one used in the old data. If FALSE time stamps will be converted in accordance with the timezone of the old data.

Value

Data frame


SwissTPH/repvisforODK documentation built on Feb. 13, 2022, 9:14 a.m.