Skip to content

Commit 51814e5

Browse files
committed
docs(fetch_csv): document new parameters
1 parent 030a60b commit 51814e5

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

R/epidatacall.R

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,22 @@ fetch_classic <- function(epidata_call, fields = NULL, disable_data_frame_parsin
193193
return(response_content$epidata)
194194
}
195195

196-
#' Fetches the data and returns the CSV text
196+
#' Fetches the data and returns a tibble or an `epidata_csv`
197197
#'
198198
#' @param epidata_call an instance of `epidata_call`
199199
#' @param fields filter fields
200-
#' @importFrom httr stop_for_status content
201-
#' @importFrom rlang abort
200+
#' @param disable_date_parsing Boolean. Optionally, `TRUE` to disable parsing of
201+
#' columns we expect to be dates, keeping them as character columns instead.
202+
#' `FALSE` (the default) to parse these columns into `Date` vectors.
203+
#' @param disable_tibble_output Boolean. Optionally, `TRUE` to output a
204+
#' character vector with the `epidata_csv` class (which provides a custom
205+
#' `print` method). `FALSE` (the default) to output a tibble.
202206
#' @return
203-
#' - For `fetch_csv`: a string containing CSV text, with the
204-
#' `"epidata_csv"` class added
207+
#' - For `fetch_csv`: a tibble, or `epidata_csv` if requested with
208+
#' `disable_tibble_output = TRUE`
205209
#'
210+
#' @importFrom httr stop_for_status content
211+
#' @importFrom rlang abort
206212
fetch_csv <- function(epidata_call, fields = NULL, disable_date_parsing = FALSE, disable_tibble_output = FALSE) {
207213
stopifnot(inherits(epidata_call, "epidata_call"))
208214
stopifnot(is.null(fields) || is.character(fields))

man/fetch_csv.Rd

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)