read_psi_data: Read psi_data from disk

View source: R/df_work_functions.R

read_psi_dataR Documentation

Read psi_data from disk

Description

Given a site code and a route, read_psi_data will return the selected psi_data object

Usage

read_psi_data(site_code, folder = ".")

Arguments

site_code

A character vector with one site code

folder

Route to the folder containing the .RData file. Default to working directory.

Value

an psi_data object with the selected site data.

Examples

# Let's access the data in "folder". This typically is the folder where the
# psi data is, 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'))

# now we read a single site
ARG_TRE_test <- read_psi_data('ARG_TRE', folder)
ARG_TRE_test



vflo/PSIsapfluxnetQC1 documentation built on Feb. 15, 2024, 3:19 a.m.