as_disag.sf | R Documentation |
Create a data.frame suitable for disaggregation regression modelling from a sf object.
## S3 method for class 'sf'
as_disag(data, rstack, response_var = "response", ...)
data |
An object of class sf containing polygons that covariates should be aggregated to and including the response variable and ID |
rstack |
A raster stack of class SpatRaster to be summarised at ID level |
response_var |
Name of the response variable found in data |
... |
any other arguments |
as_disag.sf
returns a dataframe that can be used with all agouti functions.
## Not run:
disag_data <- as_disag(data=df, rstack=covariate, response_var="cases")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.