Skip to content

Commit

Permalink
fix running message
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Nov 5, 2023
1 parent 9af738e commit b221975
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/parse.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @param compress_dir A string specifies the directory to extract files to. It
#' will be created if necessary.
#' @return A [FAERSxml] or [FAERSascii] object.
#' @examples
#' @examples
#' # the files included in the package are sampled
#' data <- faers_parse(
#' system.file("extdata", "aers_ascii_2004q1.zip", package = "faers"),
Expand Down Expand Up @@ -152,7 +152,10 @@ safely_read_ascii <- function(file, year, quarter) {
n_seps <- str_count(file_text, "$", fixed = TRUE)
collapsed_lines <- floor(n_seps / n_seps[2L]) > 1L
if (any(collapsed_lines)) {
cli::cli_warn("omiting collapsed lines: {which(collapsed_lines)}")
cli::cli_warn(c(
"omiting {sum(collapsed_lines)} collapsed line{?s}",
i = "line number: {which(collapsed_lines)}"
))
file_text <- file_text[!collapsed_lines]
}
file_text <- str_remove(file_text[!collapsed_lines], "\\$$")
Expand Down

0 comments on commit b221975

Please sign in to comment.