read_obs: Read STICS observation file (*.obs)

View source: R/read_obs.R

read_obsR Documentation

Read STICS observation file (*.obs)

Description

Read STICS observation file for sole or mixed crops.

Usage

read_obs(dirpath = getwd(), filename = NULL, mixed = NULL)

Arguments

dirpath

Directory path

filename

A vector of observation file name(s). Optional, see details.

mixed

(optional) Is the simulation on mixed species (boolean)

Details

If filename is not specified (or equal to NULL), the function tries first to match the ⁠mod_s*⁠ names for the same \*.obs names, and then to use the .obs file if there is one only (used for sole crops or for both mixed crops). If there are no .obs files, or two but not specified for reading, the function returns NULL If mixed is not specified (or equal to NULL), the function tries to read the number of species from the input files.

Value

A data.frame (sole crop) or a list of two data.frames (mixed crops) of the STICS-formated observations. Return NULL if no files were found, or more files than useable.

See Also

read_output()

Examples

## Not run: 
library(sticRs)
Meas= read_obs()

## End(Not run)


VEZY/sticRs documentation built on Oct. 26, 2023, 7:37 a.m.