cc_list_keys: List CCAFS keys

View source: R/cc_list_keys.R

cc_list_keysR Documentation

List CCAFS keys

Description

List CCAFS keys

Usage

cc_list_keys(prefix = NULL, delimiter = NULL, max = 1000, marker = NULL, ...)

Arguments

prefix

(character) string that limits the response to keys that begin with the specified prefix. the string can have spaces and newlines, which are removed internally - this allows the prefix to break across lines as prefixes can be very long

delimiter

(character) string used to group keys. Read the AWS doc for more detail.

max

(integer) number indicating the maximum number of keys to return (max 1000).

marker

(character) string that specifies the key to start with when listing objects in a bucket. Amazon S3 returns object keys in alphabetical order, starting with key after the marker in order.

...

Curl options passed on to crul::verb-GET

Details

This function lists keys from the CCAFS Amazon S3 bucket. Keys are essentially file paths. You can request data from any key that is a file (with a file extension, and has size > 0). Other keys are directories.

Value

A tibble (a data.frame, basically), with the columms:

  • Key - object key

  • LastModified - Object creation date or the last modified date, whichever is the latest.

  • ETag - "entity tag", used for cache validation

  • Size - Size of the object, in bytes, divide by 10^6 to get mb (megabytes)

  • StorageClass - ignore, just useful for CCAFS maintainers

Examples

## Not run: 
cc_list_keys(max = 1)

cc_list_keys()
cc_list_keys(max = 10)
cc_list_keys(prefix = "ccafs/ccafs-climate/data/ipcc_5ar_ciat_downscaled/")
cc_list_keys(prefix = "ccafs/ccafs-climate/data/ipcc_5ar_ciat_downscaled/
rcp2_6/2030s/bcc_csm1_1/10min/")

## End(Not run)

ropensci/ccafs documentation built on May 18, 2022, 9:49 a.m.