R/overload_classes.R

# gbif class sub-setters -------------------
# `[[.gbif` <- function(x, i) {
#   #y <- NextMethod()
#   if (inherits(i, "character")) {
#     tmp <- x[names(x) %in% i][[1]]
#   } else {
#     tmp <- x[[i]]
#   }
#   structure(tmp, class = "gbif",
#             args = attr(x, 'args'),
#             type = 'single',
#             return = attr(x, 'return'))
#   #x[names(x) %in% i][1]
# }

# `[.gbif` <- function(x, i) {
#   tmp <- x[names(x) %in% i]
#   structure(tmp, class = "gbif",
#             args = attr(x, 'args'),
#             type = 'single',
#             return = attr(x, 'return'))
# }

Try the rgbif package in your browser

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

rgbif documentation built on Sept. 11, 2023, 9:06 a.m.