Learn R Programming

equatiomatic (version 0.1.0)

extract_primary_term: Extract the primary terms from all terms

Description

Extract the primary terms from all terms

Usage

extract_primary_term(primary_term_v, all_terms)

Arguments

primary_term_v

A vector of primary terms, e.g., "partyid". Usually the result of formula_rhs[!grepl(":", formula_rhs)]

all_terms

A list of all the equation terms on the right hand side, usually the result of broom::tidy(model, quick = TRUE)$term.

Examples

Run this code
# NOT RUN {
primaries <- c("partyid", "age", "race")

full_terms <- c("partyidDon't know", "partyidOther party", "age",
"partyidNot str democrat", "age", "raceBlack", "age", "raceBlack")

extract_primary_term(primaries, full_terms)
# }

Run the code above in your browser using DataLab