read_obs: Read STICS observation file (*.obs)

Description Usage Arguments Details Value See Also Examples

View source: R/read_obs.R

Description

Read STICS observation file for sole or mixed crops.

Usage

1
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

1
2
3
4
5
## Not run: 
library(sticRs)
Meas= read_obs()

## End(Not run)

VEZY/sticRs documentation built on Oct. 1, 2018, 1:06 p.m.