R/check_internet.R

Defines functions check_internet

Documented in check_internet

#'Check whether the internet is on
#'
#'Check for internet
#' @return TRUE if internet connection is detected, FALSE otherwise.
#' @import RCurl
#' @keywords internal
check_internet <- function(){

    tryCatch(is.character(getURL("www.google.com")),
             error = function(e) {
               return(FALSE)
             })
  
}
EnquistLab/RGNRS documentation built on Oct. 18, 2021, 3:22 a.m.