replicate_df | R Documentation |
Useful for replicating prediction grids across time slices used in model fitting.
replicate_df(dat, time_name, time_values)
dat |
Data frame. |
time_name |
Name of time column in output. |
time_values |
Time values to replicate |
A data frame replicated over time_values
with a new column based on
time_name
.
df <- data.frame(variable = c("a", "b"))
replicate_df(df, time_name = "year", time_values = 1:3)
head(qcs_grid)
nd <- replicate_df(qcs_grid, "year", unique(pcod$year))
head(nd)
table(nd$year)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.