find_id: Extracts the IND~pressure IDs in the tibble.

Description Usage Arguments Value See Also Examples

View source: R/find_id.R

Description

find_id is a helper function for the user to extract the ID for a specific indicator(IND), pressure or IND~pressure combination. The 'id' in the returned tibble can then be used for filtering tibbles when using the other IND~pressure modeling functions.

Usage

1
find_id(mod_tbl, ind_name = NULL, press_name = NULL)

Arguments

mod_tbl

A tibble containing the columns ind and press..

ind_name

One or more character string naming the indicators of interest.

press_name

One or more character string naming the pressures of interest.

Value

The function returns a tibble including the id for the respective 'ind' and/or 'press'.

See Also

Other IND~pressure modeling functions: ind_init(), model_gamm(), model_gam(), plot_diagnostics(), plot_model(), scoring(), select_model(), test_interaction()

Examples

1
2
3
4
5
6
7
8
9
# Using the Baltic Sea demo data:
# Look for specific INDs in combination with every pressure
ind_name <- c("TZA","MS")
find_id(model_gam_ex, ind_name)$id
# Look for specific IND~pressure combinations
press_name <- c("Tsum", "Swin")
find_id(model_gam_ex, ind_name, press_name)
# Look for specific pressures in combination with every IND
find_id(model_gam_ex, press_name = press_name)

saskiaotto/INDperform documentation built on Oct. 27, 2021, 10:33 p.m.