R/internals.R

Defines functions .file_reader

#' Read in stored RDS data
#'
#' Reads in RDS stored data files typically stored on GitHub
#'
#' @param file_url URL to RDS file(s) for reading in
#' 
#' @importFrom magrittr %>%
#'
#' @return data type dependent on RDS file being read in
#' @noRd
#'
.file_reader <- function(file_url) {
  tryCatch(readRDS(url(file_url)), error = function(e) data.frame()) %>%
    suppressWarnings()
}

Try the nblR package in your browser

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

nblR documentation built on Feb. 16, 2023, 5:28 p.m.