Description Usage Arguments Value Source Examples
This function is optimized for reading multiple APSIM output files and storing the data in a single data frame.
If 'file'
is missing, the folder indicated in 'path'
will be
scanned by list.files
and all contained files will be loaded.
If some tables contains less columns, missing columns will be created and
filled with the value indicated in 'empty_cols'
(usually '0'
or 'NA'
). The entry indicated as title (usually the name of the file
without extension) is inserted as column 'index'
for the respective
simulations.
1 | read_apsim(file, path = ".", pattern = "out", na_strings, empty_cols = 0)
|
file |
Character vector with the names to be read. |
path |
A character value indicating the relative or absolute path to the folder containing the files. |
pattern |
A character value indicating the extension of the files
(passed to |
na_strings |
Character vector with values that have to be converted into NAs. |
empty_cols |
Value used to fill new columns, if required. |
A data frame with daily records as rows and all variables as columns.
Visit the site of the APSIM Initiative (http://www.apsim.info).
1 2 3 | ## APSIM example installed in package
rice <- read_apsim(path=path.package("cropgrowth"))
head(rice)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.