read_sunscan: Reading SunScan Output Files

Description Usage Arguments Value See Also Examples

View source: R/read_sunscan.R

Description

Importing SunScan readings from text files (output files) into the session.

Groups of readings are usually split in different tables within an output file, which are the elements of the output list if 'collapse=FALSE'. At the moment only versions 1 and 2 are implemented in the function.

Data frames are separated in the lists "Raw" and "LAI" depending on the content of the tables. Raw data are measurements of PAR, while LAI includes estimations of the leaf area index.

Usage

1
read_sunscan(file, version = 1, collapse = FALSE)

Arguments

file

Character value with the name of the file, including extension.

version

Version of the output file as integer.

collapse

A logical value indicating whether the output may be collapsed to a data frame or kept as a list.

Value

A list containing reading groups in separated data frames ('Raw' and 'LAI').

See Also

readLines().

Examples

1
2
3
4
5
6
7
8
9
file_name <- file.path(path.package("cropgrowth"), "sunscan_v1.txt")
sunscan_v1 <- read_sunscan(file_name)

## Using collapse=TRUE
sunscan_v1 <- read_sunscan(file_name, collapse=TRUE)

## Second example (note different structure of the outputs)
file_name <- file.path(path.package("cropgrowth"), "sunscan_v2.txt")
sunscan_v2 <- read_sunscan(file_name, version=2, collapse=TRUE)

kamapu/cropgrowth documentation built on Aug. 22, 2021, 8:55 a.m.