delete_ts | R Documentation |
Deletes timeseries objects specified by all combinations of variable and site
delete_ts(var_src, site_name, files_only = FALSE, verbose = TRUE)
var_src |
the variable name, e.g., "doobs_nwis", for which you want the timeseries |
site_name |
the site ID, e.g. "nwis_02322688", whose folder you want to look in |
files_only |
logical. If TRUE, only the files will be deleted, leaving an empty ts item |
verbose |
logical. Should status messages be given? |
## Not run:
login_sb()
set_scheme("mda_streams_dev")
sites <- c("nwis_05406479", "nwis_05435950", "nwis_04087119")
files <- stage_nwis_ts(sites = sites, var = "doobs",
times = c('2014-01-01 00:00','2014-01-01 05:00'))
post_ts(files, on_exists='skip')
locate_ts("doobs_nwis", sites) # find the newly posted data online
sapply(locate_ts("doobs_nwis", sites), function(tsid) sbtools::item_list_files(tsid)$fname)
# items should all still be there, but with no files
mda.streams:::delete_ts("doobs_nwis", sites, files_only=TRUE)
locate_ts("doobs_nwis", sites, by="either")
sapply(locate_ts("doobs_nwis", sites), function(tsid) sbtools::item_list_files(tsid)$fname)
# everything should disappear
post_ts(files, on_exists='replace')
mda.streams:::delete_ts("doobs_nwis", sites)
locate_ts("doobs_nwis", sites, by="either")
set_scheme("mda_streams")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.