Learn R Programming

foieGras (version 0.4.0)

grab: grab tbl's by name from a foieGras model object

Description

`grab()` lets you obtain `fitted`, `predicted`, or `data` tbl's from a compound tbl created when fitting to multiple individual data sets. The specified tbl's are appended to a single output tbl.

Usage

grab(x, what = "fitted", as_sf = TRUE)

Arguments

x

a foieGras ssm or mpm model object

what

the tibble to be grabbed; either `fitted`, `predicted` (ssm only), or `data` (single letters can be used)

as_sf

logical; if FALSE then return a tibble with unprojected lonlat coordinates, otherwise return an sf tibble. Ignored if x is an mpm model object.

Value

a tbl with all individual tbl's appended

Examples

Run this code
# NOT RUN {
## load example foieGras fit object (to save time)
data(fssm)
## grab predicted values as an unprojected tibble
preds <- grab(fssm, what = "predicted", as_sf = FALSE)

# }

Run the code above in your browser using DataLab