This function lets you post files to your projects. You will need to log in before uploading.
Usage
upload_file(
project,
file,
data_type = c("new_tags", "receivers", "detections", "events", "gps", "glider"),
print_response = F
)
Arguments
- project
The name (character) or number (numeric) of the project to which you wish post your file.
- file
The file(s) you wish to upload. If the file is located in your working directory, this can be just the filename and extension. You will need to provide the full file location if it is located elsewhere.
- data_type
Character string. The data type that you are uploading. One of: "new_tags" (default), "receivers", "detections", "events", "gps", or "glider".
- print_response
Logical. Do you want the POST response to be printed? Mostly useful for diagnostic purposes. Default is FALSE.
Details
upload_file
takes a project name or number, the file you want to upload,
and the type of file you want to upload (defaulting to VRL transmitter detections).
If data_type is "new_tags", "receivers", or "glider", only CSV and XLS/XLSX
files are accepted; if "detections", only VRL and CSV files are accepted;
if "events" or "gps", only CSV is accepted.
Multiple files can be uploaded at once, but they must all be the same data type
and posted to the same project.
Examples
if (FALSE) {
# Newly tagged fish, the default
upload_file(87, "your_tagged_fish.xls")
upload_file(87, "your_tagged_fish.xls", "new_tags")
# Transmitter detections
upload_file(
"umces boem offshore wind energy",
"c:/wherever/your_CSV_detections.csv",
"detections"
)
upload_file(
"umces boem offshore wind energy",
"c:/wherever/your_VRL_detections.vrl",
"detections"
)
# Receiver metadata
upload_file(
"umces boem offshore wind energy",
"your_receiver_metadata.xlsx", "receivers"
)
}