Skip to content

Commit ea91282

Browse files
use only is.numeric(x)
1 parent cbffb5b commit ea91282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/fwrite.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fwrite = function(x, file="", append=FALSE, quote="auto",
4343
}
4444
# Handle select argument using .shallow()
4545
if (!is.null(select)) {
46-
cols = if (is.integer(select) || is.numeric(select)) { # numeric/integer avoids O(#cols) name-match overhead
46+
cols = if (is.numeric(x)) { # numeric/integer avoids O(#cols) name-match overhead
4747
as.integer(select)
4848
} else {
4949
colnamesInt(x, select)

0 commit comments

Comments
 (0)