sfn_sites_in_folder: list available sites in a db folder

Description Usage Arguments Details Value Examples

View source: R/getters.R

Description

Retrieves the site codes in the specified folder

Usage

1
sfn_sites_in_folder(folder = ".")

Arguments

folder

Character vector of length 1 indicating the route to the db folder

Details

If folder

Value

A character vector with the site codes present in the folder, an error if the folder is not valid or does not contain any site data file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Let's access the data in "folder". This typically is the folder where the
# sapflow data at the desired unit level is (i.e. "RData/plant"), but in this
# example we will create a temporal folder with some data to test the function
folder <- tempdir()
save(ARG_TRE, file = file.path(folder, 'ARG_TRE.RData'))
save(ARG_MAZ, file = file.path(folder, 'ARG_MAZ.RData'))
save(AUS_CAN_ST2_MIX, file = file.path(folder, 'AUS_EUC_ST2_MIX.RData'))

# lets see the sites
sites <- sfn_sites_in_folder(folder)

sapfluxnetr documentation built on Aug. 28, 2020, 1:13 a.m.