Skip to content

Commit

Permalink
dontest use
Browse files Browse the repository at this point in the history
  • Loading branch information
rfsaldanha committed Jun 17, 2024
1 parent 10e0cd1 commit 1102c8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/fetch_datasus.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#' The files are downloaded to a temporary folder and deleted after the reading process.
#'
#' @examplesIf curl::has_internet() & RCurl::url.exists("ftp.datasus.gov.br", .opts = list(timeout = 3))
#' \donttest{
#' # Fetch two years of data from SIM-DO
#' fetch_datasus(year_start = 2010, year_end = 2011,
#' information_system = "SIM-DO")
Expand All @@ -43,6 +44,7 @@
#' year_end = 2014, month_end = 2,
#' uf = c("RJ", "MG", "SP", "ES"),
#' information_system = "SIH-RD")
#' }
#'
#' @return a \code{data.frame} with the contents of the DBC files.
#'
Expand Down Expand Up @@ -107,7 +109,7 @@ fetch_datasus <- function(year_start, month_start = NULL, year_end, month_end =
}

# Check DataSUS FTP server
datasus_ftp_connection <- RCurl::url.exists("ftp.datasus.gov.br", timeout.ms = 5000)
datasus_ftp_connection <- RCurl::url.exists("ftp.datasus.gov.br", .opts = list(timeout = timeout))
if(datasus_ftp_connection == TRUE){
cli::cli_alert_info("DataSUS FTP server seems to be up and reachable.")
cli::cli_alert_info("Starting download...")
Expand Down
2 changes: 2 additions & 0 deletions man/fetch_datasus.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1102c8a

Please sign in to comment.