if (requireNamespace("curl", quietly = TRUE) && curl::has_internet()) {
#### Get example DESCRIPTION file ####
url <- "https://github.com/neurogenomics/templateR/raw/master/DESCRIPTION"
path <- tempfile(fileext = "DESCRIPTION")
utils::download.file(url,path)
deps <- infer_deps(path = path)
} else {
message("No internet connection available, skipping example.")
}
Run the code above in your browser using DataLab