#' read_ncdf
#'
#' Import the contents of a NetCDF file as a `tibble`.
#'
#' @param path character
#' @param ... reserved for future use
#' @param verbose logical
#'
#' @return
#' @export
#'
#' @importFrom tidync tidync hyper_tibble
read_ncdf <- function(
path,
...,
verbose = getOption("verbose")
) {
msg <- function (...) if(isTRUE(verbose)) {
message("[read_ncdf_data] ", ...)
}
ncdf_object <-
tidync::tidync(path)
ncdf_data <-
as_tibble(
tidync::hyper_tibble(
ncdf_object))
attr(ncdf_data, "path") <-
path
return(ncdf_data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.