Description Usage Arguments Examples
Add Rain Data Frame to Postgres Database Via API
1 | api_add_rain(user_id, spot_id, rain, time_string = "12:00:00", comment = NULL)
|
user_id |
user id |
spot_id |
bathing spot id |
rain |
data frame containing rain data (columns |
time_string |
time to which rain data values relate, default:
|
comment |
character string to be written to the field "comment" of the rain database table. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# Define some fake rain data
rain <- data.frame(
datum = as.Date(c("2019-08-29", "2019-08-30")),
rain = c(1.23, 2.34)
)
# Add the rain data to the database
rain_ids <- api_add_rain(user_id = 3, spot_id = 1441, rain)
Show the IDs of the created database records
rain_ids
# Delete the fake rain data
api_delete_rain(user_id = 3, spot_id = 1441, ids = rain_ids)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.