Skip to content

Commit

Permalink
add temporary fix for tidyverse/vroom#519
Browse files Browse the repository at this point in the history
- for Darwin
  • Loading branch information
LiNk-NY committed Oct 25, 2023
1 parent fe4a431 commit 87cf4ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions R/TENxPeaks-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ TENxPeaks <- function(resource, extension, ...) {
#' @export
setMethod("import", "TENxPeaks", function(con, format, ...) {
.checkPkgsAvail("readr")
if (identical(Sys.info()[["sysname"]], "Darwin"))
readr::local_edition(1)
panno <- readr::read_tsv(
file = path(con), col_types = c("c", "n", "n", "c", "n", "c")
)
Expand Down
8 changes: 5 additions & 3 deletions R/TENxTSV-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#' @details Typical `.tsv` files obtained from the 10X website are compressed
#' and contain information relevant to 'barcodes' and 'features'. Currently,
#' the code only supports files such as `features.tsv.*` and `barcodes.tsv.*`.
#'
#'
#' @inheritParams TENxMTX-class
#'
#'
#' @return A `TENxTSV` class object; a `tibble` for the import method
#'
#' @exportClass TENxTSV
Expand All @@ -27,6 +27,8 @@
#' @export
setMethod("import", "TENxTSV", function(con, format, text, ...) {
resource <- path(con)
if (identical(Sys.info()[["sysname"]], "Darwin"))
readr::local_edition(1)
df <- readr::read_tsv(
resource, col_names = FALSE, show_col_types = FALSE, progress = FALSE,
...
Expand All @@ -40,7 +42,7 @@ setMethod("import", "TENxTSV", function(con, format, text, ...) {
})

#' @rdname TENxTSV-class
#'
#'
#' @inheritParams TENxMTX
#'
#' @export
Expand Down

0 comments on commit 87cf4ce

Please sign in to comment.