Description Usage Arguments Value Examples
Get the high level sections from the form for a given submission. Only returns sections that are not all NA. Requires data in the form returned from 'make_tidier_table()'.
1 | get_main_sections(data, id)
|
data |
Dataframe with at least three columns, 'form_data_id', 'section', and 'response'. |
id |
form_data_id of the submission. |
A vector of the high level sections from the form for which the submission is not all NA. If 'id' is not in the 'form_data_id' column, then returns 'NULL'.
1 2 3 4 5 6 7 8 9 10 11 12 | data <- tibble::tribble(
~variables, ~sub1, ~sub2,
"naming.first_name", "Mel", "Jimothy",
"naming.last_name", "Jovin", "Smithery",
"exercise.pushups.min", "10", NA,
"exercise.pushups.max", "20", NA,
"exercise.pullups.reps.min", "1", NA,
"exercise.pullups.reps.max", "2", NA
)
data <- make_tidier_table(data)
get_main_sections(data, "sub1")
get_main_sections(data, "sub2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.