restrict_by_query: Reduce nodal types using statement

View source: R/set_restrictions.R

restrict_by_queryR Documentation

Reduce nodal types using statement

Description

Reduce nodal types using statement

Usage

restrict_by_query(model, statement, join_by = "|", given = NULL, keep = FALSE)

Arguments

model

a model created by make_model()

statement

a list of character vectors specifying nodal types to be removed from the model. Use get_nodal_types to see syntax.

join_by

A string or a list of strings. The logical operator joining expanded types when statement contains wildcard (.). Can take values '&' (logical AND) or '|' (logical OR). When restriction contains wildcard (.) and join_by is not specified, it defaults to '|', otherwise it defaults to NULL.

given

A character vector or list of character vectors specifying nodes on which the parameter set to be restricted depends. given must either be NULL or of the same length as statement. When mixing statements that are further restricted by given and ones that are not, statements without given restrictions should have given specified as one of NULL, NA, "" or " ".

keep

Logical. If 'FALSE', removes and if 'TRUE' keeps only causal types specified by restriction.

Value

A list with two components: 1. a vector with parameters names of parameters implicated by the restrictions, 2. a vector of subsetting instructions used to identify implicated causal types

See Also

Other restrictions: restrict_by_labels(), set_restrictions()


CausalQueries documentation built on June 22, 2024, 6:50 p.m.