Learn R Programming

schemate (version 0.1.0)

schema_where_path: Create schema query predicates

Description

Create schema query predicates

Usage

schema_where_path(pattern, fixed = FALSE)

schema_where_check(kind = NULL)

Value

A predicate function with signature function(path, node).

Arguments

pattern

Pattern passed to grepl() for matching schema paths.

fixed

Whether pattern should be matched literally.

kind

Optional check kind to match, such as "list" or "int".

Examples

Run this code
by_path <- schema_where_path("(^|\\$)`date-parts`\\$rest$")
by_int <- schema_where_check("int")

schema <- schema_infer(list(id = 1L))
schema

schema_find(schema, by_int)

Run the code above in your browser using DataLab