Skip to content

Commit ebad123

Browse files
committed
R.utils version error
1 parent a048dfe commit ebad123

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/fread.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ yaml=FALSE, tmpdir=tempdir(), tz="UTC")
119119
if ((w <- endsWithAny(file, c(".gz", ".bgz",".bz2"))) || (gzsig <- is_gzip(file_signature)) || is_bzip(file_signature)) {
120120
if (!requireNamespace("R.utils", quietly = TRUE))
121121
stopf("To read %s files directly, fread() requires 'R.utils' package which cannot be found. Please install 'R.utils' using 'install.packages('R.utils')'.", if (w<=2L || gzsig) "gz" else "bz2") # nocov
122+
if (packageVersion("R.utils") < "2.13.0")
123+
stopf("Reading compressed files in fread requires R.utils version 2.13.0 or higher. Please upgrade R.utils.")
122124
FUN = if (w<=2L || gzsig) gzfile else bzfile
123125
decompFile = tempfile(tmpdir=tmpdir)
124126
on.exit(unlink(decompFile), add=TRUE)

0 commit comments

Comments
 (0)