Learn R Programming

apsimx (version 2.2)

summary.met: Summary for an APSIM met file

Description

Create a data.frame summarizing an object of class ‘met’

Usage

# S3 method for met
summary(
  object,
  ...,
  years,
  months,
  days,
  julian.days,
  compute.frost = FALSE,
  frost.temperature = 0,
  check = FALSE,
  verbose = FALSE,
  na.rm = FALSE,
  digits = 2
)

Arguments

object

object of class ‘met’

...

optional argument (none used at the momemt)

years

optional argument to subset years

months

optional argument to subset by months. If an integer, it should be between 1 and 12. If a character, it can be in the format, for example, ‘jan’ or ‘Jan’.

days

optional argument to subset by days. It should be an integer between 1 and 31.

julian.days

optional argument to subset by julian days. It should be a vector of integers between 1 and 365. Either use ‘days’ or ‘julian.days’ but not both.

compute.frost

logical (default FALSE). Whether to compute frost statistics.

frost.temperature

value to use for the calculation of the frost period (default is zero).

check

logical (default FALSE). Whether to ‘check’ the ‘met’ object.

verbose

whether to print additional infomation to the console

na.rm

whether to remove missing values. Passed to ‘aggregate’

digits

digits for rounding (default is 2).

Value

an object of class ‘data.frame’ with attributes

Details

The frost free period is computed by first spliting each year (or year interval) in two halves. The first and last frosts in the first and second period are found. For the Northern hemisphere calendar days are used (1-365). For the Southern hemisphere the year is split in two halfs, but the second half of the year is used as the first part of the growing season. If not frost is found a zero is returned.

Examples

Run this code
# NOT RUN {
extd.dir <- system.file("extdata", package = "apsimx")
ames <- read_apsim_met("Ames.met", src.dir = extd.dir)

summary(ames, years = 2014:2016)

# }

Run the code above in your browser using DataLab