Skip to contents

This function lists the file names, types, upload date, and URLs of MATOS project files -- basically everything you see in the Project Files section of your project page. Because it is from your project page, you will be prompted to log in.

Usage

list_project_files(
  project,
  file_type = c("all", "detections", "receiver_metadata", "tag_metadata"),
  since = NULL
)

Arguments

project

Either the project number (the number in your project page URL) or the full name of the project (the big name in bold on your project page, not the "Project Title").

file_type

one of, or a vector of, "all" (default), "detections", "receiver_metadata", or "tag_metadata". Partial matching is allowed.

since

Only list files uploaded after this date. Optional, but must be in YYYY-MM-DD format.

Value

A data frame with columns of "project", "file_type", "upload_date", and "file_name".

Details

list_project_files is a wrapper around a web-scraping routine:

  1. find the project number if not provided, 2) download the HTML table, 3) parse the URL for each file, and 4) combine the table and URLs into a data frame. This function is most useful when investigating what files you have available, and then downloading them with get_project_file.

list_project_files lists tag and receiver metadata files that have been uploaded by the user. These are the files listed on the Project Files section of your project page.

Examples

if (FALSE) { # all(skip_example_on_cran(), skip_example_on_runiverse())
# List files using project number:
list_project_files(87)

# Or using the project name
list_project_files("umces boem offshore wind energy")

# List only the receiver deployment metadata files
List_project_files(87, "receiver_metadata")

# List both the receiver and transmitter deployment metadata files
List_project_files(87, c("receiver_metadata", "tag_metadata"))

# Cheat and use shorter names
List_project_files(87, c("receiver", "tag"))
}