Skip to content

Commit ce05b72

Browse files
Use named error, use ncol
1 parent d315d03 commit ce05b72

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
@@ -44,7 +44,7 @@ fwrite = function(x, file="", append=FALSE, quote="auto",
4444
is.character(sep) && length(sep)==1L && (nchar(sep) == 1L || identical(sep, "")),
4545
is.character(sep2) && length(sep2)==3L && nchar(sep2[2L])==1L,
4646
is.character(dec) && length(dec)==1L && nchar(dec) == 1L,
47-
(NCOL(x) <= 1L || dec != sep), # sep2!=dec and sep2!=sep checked at C level when we know if list columns are present
47+
`dec and sep must be distinct for multi-column tables` = (ncol(x) <= 1L || dec != sep), # sep2!=dec and sep2!=sep checked at C level when we know if list columns are present
4848
is.character(eol) && length(eol)==1L,
4949
length(qmethod) == 1L && qmethod %chin% c("double", "escape"),
5050
length(compress) == 1L && compress %chin% c("auto", "none", "gzip"),

0 commit comments

Comments
 (0)