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)
             })
  
}

Try the GNRS package in your browser

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

GNRS documentation built on Oct. 14, 2021, 1:09 a.m.