Stable lifecycle

odata_submission_rectangle(
  data,
  names_repair = "universal",
  names_sep = "_",
  form_schema = NULL,
  verbose = get_ru_verbose()
)

Arguments

data

A nested list of lists as given by odata_submission_get.

names_repair

The argument names_repair for tidyr::unnest_wider, default: "universal".

names_sep

The argument names_sep for tidyr::unnest_wider, default: "_". Un-nested variables inside a list column will be prefixed by the list column name, separated by names_sep. This avoids unsightly repaired names such as latitude...1.

form_schema

An optional form_schema, like the output of form_schema. If a form schema is supplied, location fields will not be unnested. While WKT location fields contain plain text and will never be unnested, GeoJSON location fields would cause errors during unnesting.

verbose

Whether to display debug messages or not. Read `vignette("setup", package = "ruODK")` to learn how `ruODK`'s verbosity can be set globally or per function.

Value

The submissions as un-nested tibble

See also

Examples

if (FALSE) { # Using canned data data_parsed <- odata_submission_rectangle(fq_raw, verbose = TRUE) # Field "device_id" is known part of fq_raw testthat::expect_equal( data_parsed$device_id[[1]], fq_raw$value[[1]]$device_id ) # fq_raw has two submissions testthat::expect_equal(length(fq_raw$value), nrow(data_parsed)) }