get_onset_rst {barrks} | R Documentation |
Get onset, diapause or mortality
Description
Get onset, diapause or mortality as day of year or raw output. Note that multiple mortality events are possible over the season.
Usage
get_onset_rst(pheno, as_doy = TRUE, dates = prop_dates(pheno))
get_onset_df(
pheno,
stations = prop_stations(pheno),
as_doy = TRUE,
dates = prop_dates(pheno)
)
get_diapause_rst(pheno, as_doy = TRUE, dates = prop_dates(pheno))
get_diapause_df(
pheno,
stations = prop_stations(pheno),
as_doy = TRUE,
dates = prop_dates(pheno)
)
get_mortality_rst(pheno, as_doy = TRUE, dates = prop_dates(pheno))
get_mortality_df(
pheno,
stations = prop_stations(pheno),
as_doy = TRUE,
dates = prop_dates(pheno)
)
Arguments
pheno |
A phenology (see |
as_doy |
If |
dates |
Select dates that should be present in the output. |
stations |
Pass a character vector to choose stations assigned to |
Value
-
get_onset_rst()
,get_diapause_rst()
,get_mortality_rst()
: A (multi-layer) SpatRaster. -
get_onset_df()
,get_diapause_df()
,get_mortality_df()
: A data frame.
Functions
-
get_onset_rst()
: Returns a (multi-layer) SpatRaster of the onset. -
get_onset_df()
: Returns a data frame of the onset. -
get_diapause_rst()
: Returns a (multi-layer) SpatRaster of the diapause. -
get_diapause_df()
: Returns a data frame of the diapause. -
get_mortality_rst()
: Returns a (multi-layer) SpatRaster of the mortality. -
get_mortality_df()
: Returns a data frame of the mortality.
Examples
# calculate phenology
p <- phenology('phenips-clim', barrks_data(), .quiet = TRUE)
# plot onset, diapause, mortality
get_onset_rst(p) |> terra::plot()
get_diapause_rst(p) |> terra::plot()
get_mortality_rst(p)[[1]] |> terra::plot()