browse_table: Browse table returned by 'cjpg_table()' or 'cjsg_table()'

Description Usage Arguments Value Matching See Also

Description

This function uses a list of regex to filter CJPG and CJSG tables (only if they are of type "classes" or "subjects") more easily than with dplyr::select(). For details on how the matching occurs, see Matching.

Usage

1

Arguments

table

Table returned by cjpg_table() or cjsg_table() (only valid for "classes" or "subjects" types)

patterns

A list containing (at most) 6 character vectors of one or more regular expressions (applied from left to right on name0 to name5), e.g., list(c("ADM", "CRIMINAL"), "", "", "", "", "Recurso")

Value

The original table filtered according to patterns

Matching

For the matching to work properly, patterns should be a list of at most 6 character vectors, each one containing either one or a vector of regular expressions to be applied from left to right on columns name0 to name5 (note that vectors are ORed and different elements are ANDed). Example: If patterns looks something like list(c("ADM", "CRIMINAL"), "", "", "", "", "Recurso"), then we'll get back the rows where name0 contains "ADM" or "CRIMINAL" and where name5 contains "Recurso".

See Also

cjpg_table(), cjsg_table()


jtrecenti/esaj documentation built on June 20, 2019, 7:13 p.m.