R/nc_sources.R

Defines functions nc_sources.character nc_sources

Documented in nc_sources nc_sources.character

#' NetCDF sources
#' 
#' A record of file, URL, or any data source with NetCDF. 
#' @param x data source string
#'
#' @param ... ignored
#'
#' @name nc_sources
#' @export
nc_sources <- function(x, ...) {
  UseMethod("nc_sources")
}
#' @name nc_sources
#' @export
nc_sources.character <- function(x, ...) {
  if (file.exists(x)) {
    path <- normalizePath(x, winslash = "/")
  } else {
    path <- x
  }
  tibble(access = Sys.time(), source = path)
}

Try the ncmeta package in your browser

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

ncmeta documentation built on Nov. 2, 2023, 5:57 p.m.