Learn R Programming

equatiomatic (version 0.1.0)

extract_all_subscripts: Extract all subscripts

Description

Extract all subscripts

Usage

extract_all_subscripts(primary_list, full_term_list)

Arguments

primary_list

A list of primary terms

full_term_list

A list of full terms

Value

A list with the subscripts. If full term has no subscript, returns "".

Examples

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

ft_list <- list("partyidNot str republican",
                c("partyidInd,near dem", "age"),
                c("age", "raceBlack"),
                c("partyidInd,near dem", "age", "raceBlack"))

extract_all_subscripts(p_list, ft_list)
# }

Run the code above in your browser using DataLab