untidy_rfrnds: Untidy into "raw" RDB API referendum data

untidy_rfrndsR Documentation

Untidy into "raw" RDB API referendum data

Description

Converts from the tidied rfrnds() to the "raw" MongoDB schema used by the RDB API. Basically reverts tidy_rfrnds().

Usage

untidy_rfrnds(data, as_tibble = FALSE)

Arguments

data

The data to untidy as returned by rfrnds().

as_tibble

Whether or not to return the result as a tibble. If FALSE, a list is returned.

Value

If as_tibble = FALSE, a list with one element per referendum, suitable to be converted jsonlite::toJSON() and then fed to the RDB API.

Otherwise a tibble of the same format as returned by rfrnds(tidy = FALSE).


zdaarau/c2d documentation built on Dec. 18, 2024, 1:24 p.m.