View source: R/data_write_update.R
write_update_data | R Documentation |
Writes or updates the sensor data in the data folder.
It retrieves the data for the specified sensor between start_date
and end_date
(inclusive) using the retrieve_sensor
function,
and then converts certain columns to character strings before writing the data
to a RData file in the data
folder (if create_directory = TRUE
),
to a temporary folder otherwise.
write_update_data(segment_name, start_date, end_date, create_directory = FALSE)
segment_name |
Character. Name of the segment, as specified in config. |
start_date |
Date. Start date "aaaa-mm-jj" |
end_date |
Date. End date "aaaa-mm-jj" |
create_directory |
Boolean: Does the file need to be created in the project directory? Default to FALSE. |
Boolean: TRUE if the data is well saved/written, FALSE otherwise (no data for example)
## Not run: # This function requires a valid API key
period <- as.Date(c('2022-01-01', '2022-12-31'))
write_update_data('RteVitre-06', period[1], period[2])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.