lq

knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE,
  warning = FALSE,
  message = FALSE
)

Build Status

List queries

leveraging jqr, an R interface to jq, a JSON processor http://stedolan.github.io/jq/

Installation

remotes::install_github("ropensci/lq")
library(lq)

Interfaces

low level

(x <- list(a = list(b = list(c = 1, d = 2, e = 3)), f = 45))
lq(x, ".[][] | keys | reverse")

high level

library(jqr)
(tj(x) %>% index()) %>% fj
(tj(x) %>% index() %>% index()) %>% fj
(tj(x) %>% index() %>% index() %>% select(. > 2)) %>% fj
(tj(x) %>% index() %>% select(. > 2)) %>% fj
(tj(x) %>% index() %>% index() %>% keys() %>% reverse) %>% fj

TODO

Meta

rofooter



ropensci/lq documentation built on May 14, 2022, 5:07 p.m.