Learn R Programming

barrks (version 1.1.1)

get_development_rst: Get the beetles development

Description

Get the beetles development of specific generations. A value of -1 implies that the generation is not present yet.

Usage

get_development_rst(pheno, generation, dates = prop_dates(pheno))

get_development_df( pheno, stations = prop_stations(pheno), generation = prop_hatched_generations(pheno), dates = prop_dates(pheno) )

Value

  • get_development_rst(): A multi-layer SpatRaster.

  • get_development_df(): A data frame which contains a field for each generation (gen_1, gen_1.5, gen_2, gen_2.5, ...) requested.

Arguments

pheno

A phenology (see phenology())

generation

Generation of interest. For sister broods, 0.5 should be added. get_development_df() allows multiple generations here.

dates

Select dates that should be present in the output.

stations

Pass a character vector to choose stations assigned to pheno by their names, or pass different stations. See stations_create() for details.

Examples

Run this code
# \donttest{
# calculate station-based phenology
p <- phenology('phenips-clim', barrks_data('stations'), .quiet = TRUE)

# print the development data frame of station 'Freiburg'
df <- get_development_df(p, 'Freiburg')
df[,4:ncol(df)] <- round(df[,4:ncol(df)], 3) # round results
df
# }

Run the code above in your browser using DataLab