expand | R Documentation |
Function expand expands a data frame from animals as observations to animal-years as obserations
expand(
filename,
start_year = 1976,
current_year = NULL,
fem_age_mat = 10,
fem_age_senesc = 43,
ages2stages = NULL
)
filename |
A file location (csv file) with births and deaths of each animal |
start_year |
Starting year for the expanded data, starts at 1976 |
current_year |
End year for the expanded data, defaults to current calendar year |
fem_age_mat |
Female age at maturity, 10 years of age by default |
fem_age_senesc |
Female age at reproductive senescence, defaults to 43 |
ages2stages |
A data frame of mapping ages and sexes to stages |
## Not run:
library(kwdemog)
data(orca)
data(ages2stages)
expanded_data = expand(orca, ages2stages = ages2stages)
# or use a filename
expanded_data = expand("use_this_file.csv", start_year = 1979, current_year = 2018,
fem_age_mat = 10, fem_age_senesc = 43, ages2stages = ages2stages)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.