A utility for creating a nested list for marshalling to JSON from a simple data.frame. This function will rarely be called on its own - instead, it is called from inside api_upload_data().

create_registration_data(
  df,
  data_cols,
  req_cols = c("unAntName", "unTagName", "regDataTime")
)

Arguments

df

data.frame, with column names exactly "unAntName", "unTagName", "regDataTime"

data_cols

character, the name of columns to use for the data payload.

req_cols

character, the names of columns required to be in the data.frame

Author

Matt Espe

Examples

if (FALSE) {
create_registration_data(detection_data, data_cols = c("temp_C", "turbidity"))
}