sf_add_risk_factor | R Documentation |
Add a risk factor to STOCfree_data
sf_add_risk_factor( sfd, risk_factor_data, risk_herd_col = NULL, risk_date_col = NULL, risk_factor_col = NULL, risk_factor_type = c("continuous", "categorical"), risk_factor_ref = NULL, lag1 = 0, lag2 = 0, FUN = sum )
sfd |
STOC free data |
risk_factor_data |
a data.frame with a risk factor |
risk_herd_col |
name of the column with herd / farm identifiers |
risk_date_col |
name of the column with date when the risk factors apply |
risk_factor_col |
name of the column(s) with risk factor values |
risk_factor_type |
risk factor type. Must be either continuous or categorical |
lag1 |
start of the time interval for risk factor aggregation |
lag2 |
end of the time interval for risk factor aggregation |
FUN |
function used for risk factor aggregation. By default sum() is used, the values are added. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.