Description Usage Arguments Value See Also Examples
View source: R/get_sum_output.R
get_sum_output
is a helper function for model_trend
,
model_gam
, and model_gamm
and extracts from a list
of summary.gam
objects specific values defined in 'varname'.
1 | get_sum_output(sum_list, varname, cell = NULL)
|
sum_list |
A list of summary objects created with summary.gam. |
varname |
A character naming the element to extract from the 'sum_list'. |
cell |
If more than one value is stored under 'varname' you need to specify which one you want to pull with 'cell'. |
The function returns a vector with the length of 'sum_list' containing the extracted values.
model_trend
, model_gam
,
model_gamm
1 2 3 4 5 6 | # Using some models of the Baltic Sea demo data:
sum_list <- purrr::map(model_gam_ex$model, ~mgcv::summary.gam(.) )
get_sum_output(sum_list, varname = "edf")
# Get p-val with cell argument:
get_sum_output(sum_list, "s.table", cell = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.