Read STICS observation file for sole or mixed crops.

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)

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.

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.

See also

Examples

if (FALSE) { library(sticRs) Meas= read_obs() }