knitr::opts_chunk$set( comment = "#>", collapse = TRUE, warning = FALSE, message = FALSE )
List queries
leveraging jqr
, an R interface to jq, a JSON processor http://stedolan.github.io/jq/
remotes::install_github("ropensci/lq")
library(lq)
(x <- list(a = list(b = list(c = 1, d = 2, e = 3)), f = 45))
lq(x, ".[][] | keys | reverse")
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
jqr
so that we automatigically convert json back to list instead of needing fj()
at the end of a high level DSL workflowtj()
unneccesarylq
in R doing citation(package = 'lq')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.