R/zzz.R

Defines functions pluck jc neon_base neon_parse

pluck <- function(x, name, type) {
  if (missing(type)) {
    lapply(x, "[[", name)
  } else {
    vapply(x, "[[", name, FUN.VALUE = type)
  }
}

jc <- function(x) Filter(Negate(is.null), x)

neon_base <- function() "http://data.neonscience.org/api/v0"

neon_parse <- function(x, parse = TRUE, flatten = TRUE) {
  jsonlite::fromJSON(x, parse, flatten = flatten)
}

Try the nneo package in your browser

Any scripts or data that you put into this service are public.

nneo documentation built on June 20, 2017, 9:08 a.m.