@@ -43,7 +43,7 @@ function (x, file = "", append = FALSE, quote = TRUE, sep = " ",
4343 if (is.null(d [[2L ]]) && makeColnames && p > 0L )
4444 d [[2L ]] <- paste0(" V" , 1L : p )
4545 if (qset )
46- quote <- if (is.character(x )) seq_len(p ) else numeric ()
46+ quote <- if (is.character(x )) seq_len(p ) else integer ()
4747 } else { # # data.frame
4848 if (qset )
4949 quote <- if (length(x ))
@@ -71,7 +71,7 @@ function (x, file = "", append = FALSE, quote = TRUE, sep = " ",
7171 nocols <- p == 0L
7272
7373 if (is.logical(quote )) # must be false
74- quote <- integer( 0 ) # NULL
74+ quote <- NULL
7575 else if (is.numeric(quote )) {
7676 if (any(quote < 1L | quote > p ))
7777 stop(" invalid numbers in 'quote'" )
@@ -139,6 +139,7 @@ function (x, file = "", append = FALSE, quote = TRUE, sep = " ",
139139 x [needconv ] <- lapply(x [needconv ], as.character )
140140 }
141141
142+ if (is.null(quote )) quote <- integer(0 )
142143 invisible (.External2(C_writetable , x , file , nrow(x ), p , rnames , sep , eol ,
143144 na , dec , as.integer(quote ), qmethod != " double" ))
144145}
0 commit comments