Skip to content

Commit 5cb26ee

Browse files
have to base:: for getRversion
1 parent 0cf4cb4 commit 5cb26ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/fread.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +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 (getRversion() >= "4.5.0" && packageVersion("R.utils") < "2.13.0")
122+
# not worth doing a behavior test here, so just use getRversion().
123+
if (packageVersion("R.utils") < "2.13.0" && base::getRversion() >= "4.5.0")
123124
stopf("Reading compressed files in fread requires R.utils version 2.13.0 or higher. Please upgrade R.utils.") # nocov
124125
FUN = if (w<=2L || gzsig) gzfile else bzfile
125126
decompFile = tempfile(tmpdir=tmpdir)

0 commit comments

Comments
 (0)