OuhscBbmc / REDCapR

@@ -76,6 +76,9 @@
Loading
76 76
#' @param guess_max Deprecated.
77 77
#' @param http_response_encoding  The encoding value passed to
78 78
#' [httr::content()].  Defaults to 'UTF-8'.
79 +
#' @param locale a [readr::locale()] object to specify preferences like
80 +
#' number, date, and time formats.  This object is passed to
81 +
#' [`readr::read_csv()`].  Defaults to [readr::default_locale()].
79 82
#' @param verbose A boolean value indicating if `message`s should be printed
80 83
#' to the R console during the operation.  The verbose output might contain
81 84
#' sensitive information (*e.g.* PHI), so turn this off if the output might
@@ -193,6 +196,7 @@
Loading
193 196
  guess_type                    = TRUE,
194 197
  guess_max                     = NULL, # Deprecated parameter
195 198
  http_response_encoding        = "UTF-8",
199 +
  locale                        = readr::default_locale(),
196 200
  verbose                       = TRUE,
197 201
  config_options                = NULL,
198 202
  id_position                   = 1L
@@ -223,6 +227,7 @@
Loading
223 227
  if (!is.null(guess_max)) warning("The `guess_max` parameter in `REDCapR::redcap_read()` is deprecated.")
224 228
225 229
  checkmate::assert_character(http_response_encoding    , any.missing=FALSE,     len=1)
230 +
  checkmate::assert_class(    locale, "locale"          , null.ok = FALSE)
226 231
227 232
  checkmate::assert_logical(  verbose                   , any.missing=FALSE,     len=1, null.ok=TRUE)
228 233
  checkmate::assert_list(     config_options            , any.missing=TRUE ,            null.ok=TRUE)
@@ -270,6 +275,7 @@
Loading
270 275
    datetime_range_end     = datetime_range_end,
271 276
    guess_type         = guess_type,
272 277
    http_response_encoding = http_response_encoding,
278 +
    locale             = locale,
273 279
    verbose            = verbose,
274 280
    config_options     = config_options
275 281
  )
@@ -341,6 +347,7 @@
Loading
341 347
      guess_type                  = FALSE,
342 348
      # guess_max                   = guess_max, # Not used, because guess_type is FALSE
343 349
      http_response_encoding      = http_response_encoding,
350 +
      locale                      = locale,
344 351
      verbose                     = verbose,
345 352
      config_options              = config_options
346 353
    )
@@ -379,7 +386,9 @@
Loading
379 386
  if (is.null(col_types) && guess_type) {
380 387
    ds_stacked <-
381 388
      ds_stacked %>%
382 -
      readr::type_convert()
389 +
      readr::type_convert(
390 +
        locale = locale
391 +
      )
383 392
  }
384 393
385 394
  elapsed_seconds          <- as.numeric(difftime( Sys.time(), start_time, units="secs"))

@@ -64,6 +64,9 @@
Loading
64 64
#' specifies the maximum number of records to use for guessing column types.
65 65
#' @param http_response_encoding  The encoding value passed to
66 66
#' [httr::content()].  Defaults to 'UTF-8'.
67 +
#' @param locale a [readr::locale()] object to specify preferences like
68 +
#' number, date, and time formats.  This object is passed to
69 +
#' [`readr::read_csv()`].  Defaults to [readr::default_locale()].
67 70
#' @param verbose A boolean value indicating if `message`s should be printed
68 71
#' to the R console during the operation.  The verbose output might contain
69 72
#' sensitive information (*e.g.* PHI), so turn this off if the output might
@@ -180,6 +183,7 @@
Loading
180 183
  guess_type                    = TRUE,
181 184
  guess_max                     = 1000L,
182 185
  http_response_encoding        = "UTF-8",
186 +
  locale                        = readr::default_locale(),
183 187
  verbose                       = TRUE,
184 188
  config_options                = NULL
185 189
) {
@@ -210,6 +214,7 @@
Loading
210 214
  checkmate::assert_integerish(guess_max                , any.missing=FALSE, len=1, lower=1)
211 215
  checkmate::assert_character(http_response_encoding    , any.missing=FALSE,     len=1)
212 216
217 +
  checkmate::assert_class(    locale, "locale"          , null.ok = FALSE)
213 218
  checkmate::assert_logical(  verbose                   , any.missing=FALSE, len=1, null.ok=TRUE)
214 219
  checkmate::assert_list(     config_options            , any.missing=TRUE ,        null.ok=TRUE)
215 220
@@ -271,6 +276,7 @@
Loading
271 276
          file            = I(kernel$raw_text),
272 277
          col_types       = col_types,
273 278
          guess_max       = guess_max,
279 +
          locale          = locale,
274 280
          show_col_types  = FALSE
275 281
        ) %>%
276 282
        as.data.frame(),
Files Coverage
R 96.86%
Project Totals (34 files) 96.86%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 3%
9
    patch:
10
      default:
11
        target: auto
12
        threshold: 3%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading