This provides a wrapper around the
fluxnet-shuttle command-line utility's
listall command, which downloads a data frame of available .zip files. By
default, the downloaded CSV is stored in
rappdirs::user_cache_dir("fluxnet"). If there is allready a FLUXNET
shanpshot CSV file downloaded and it is more recent than cache_age, it will
be read in instead of downloading a new snapshot.
Usage
flux_listall(
cache_dir = rappdirs::user_cache_dir("fluxnet"),
cache_age = as.difftime(1, units = "days"),
clean_cache = 10L,
log_file = NULL,
echo_cmd = FALSE
)Arguments
- cache_dir
The directory to store the list of available FLUXNET data in.
- cache_age
A
difftimeobject of length 1. If there are no cached snapshots more recent thancache_age, a new one will be downloaded and stored. You can force the cache to be invalidated withcache_age = -Inf.- clean_cache
A number of files \(\geq 1\) to keep in
cache_dir. Defaults to 10, which keeps only the 10 most recent snapshots.- log_file
An optional file path (e.g.
"log.txt") to direct thefluxnet-shuttlelog to. Useful for debugging.- echo_cmd
Set to
TRUEto print the shell command in the console. Passed toprocessx::run().