post_ts: Post a new timeseries file to SB

View source: R/post_ts.R

post_tsR Documentation

Post a new timeseries file to SB

Description

Post a staged file from the local computer to ScienceBase

Usage

post_ts(files, on_exists = c("stop", "skip", "replace", "merge"),
  archive_existing = TRUE, verbose = TRUE)

Arguments

files

a string vector of file paths for POSTing

on_exists

character specifying an action when a file to post already exists on ScienceBase

archive_existing

logical. if the file already exists, should it be archived before being replaced with a new or merged file (when on_exists == 'replace' or 'merge', respectively)?

verbose

logical. Should status messages be given?

Author(s)

Luke Winslow, Corinna Gries, Jordan S Read

Examples

## Not run: 
login_sb()
set_scheme("mda_streams_dev")

sites <- c("nwis_05406479", "nwis_05435950", "nwis_04087119")
post_site(sites, on_exists="clear")
files <- stage_nwis_ts(sites = sites, var = "doobs", 
  times = c('2014-01-01 00:00','2014-01-01 05:00'), version='tsv')
post_ts(files)
locate_ts("doobs_nwis", sites) # find the newly posted data online
post_ts(files, on_exists="skip")
post_ts(files, on_exists="replace")
post_site(sites, on_exists="clear")
 
set_scheme("mda_streams")

## End(Not run)

USGS-R/mda.streams documentation built on June 3, 2023, 8:43 a.m.