diff --git a/NEWS.md b/NEWS.md index 23ba19c0c4..bb1469d2ea 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,10 @@ 1. Continued work to remove non-API C functions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PRs and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/. +2. The following in-progress deprecations have proceeded: + + + Argument `logicalAsInt` to `fwrite()` has been removed. + # data.table [v1.17.0](https://github.com/Rdatatable/data.table/milestone/34) (20 Feb 2025) ## POTENTIALLY BREAKING CHANGES diff --git a/R/fwrite.R b/R/fwrite.R index 7e7da40c95..934046f35a 100644 --- a/R/fwrite.R +++ b/R/fwrite.R @@ -3,8 +3,7 @@ fwrite = function(x, file="", append=FALSE, quote="auto", sep2=c("","|",""), eol=if (.Platform$OS.type=="windows") "\r\n" else "\n", na="", dec=".", row.names=FALSE, col.names=TRUE, qmethod=c("double","escape"), - logical01=getOption("datatable.logical01", FALSE), # due to change to TRUE; see NEWS - logicalAsInt=NULL, + logical01=getOption("datatable.logical01", FALSE), scipen=getOption('scipen', 0L), dateTimeAs = c("ISO","squash","epoch","write.csv"), buffMB=8L, nThread=getDTthreads(verbose), @@ -23,9 +22,6 @@ fwrite = function(x, file="", append=FALSE, quote="auto", compress = match.arg(compress) dateTimeAs = match.arg(dateTimeAs) dateTimeAs = chmatch(dateTimeAs, c("ISO", "squash", "epoch", "write.csv")) - 1L - if (!is.null(logicalAsInt)) { - stopf("logicalAsInt has been renamed logical01 for consistency with fread.") - } scipen = if (is.numeric(scipen)) as.integer(scipen) else 0L buffMB = as.integer(buffMB) nThread = as.integer(nThread) diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index 3e3efa3c3b..39917fd5ae 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -10933,7 +10933,7 @@ test(1736.03, fwrite(DT, sep2=c("",",","")), error="sep.*,.*sep2.*,.*must all be test(1736.04, fwrite(DT, sep2=c("","||","")), error="nchar.*sep2.*2") test(1736.05, capture.output(fwrite(DT, sep='|', sep2=c("c(",",",")"), logical01=FALSE)), c("A|B|C", "1|c(1,2,3,4,5,6,7,8,9,10)|c(s,t,u,v,w)", "2|c(15,16,17,18)|c(1.2,2.3,3.4,3.14159265358979,-9)", "3|c(7)|c(foo,bar)", "4|c(9,10)|c(TRUE,TRUE,FALSE)")) -test(1736.06, fwrite(DT, sep='|', sep2=c("{",",","}"), logicalAsInt=TRUE), error="logicalAsInt has been renamed logical01") +# 1736.06 was of defunct logicalAsInt argument DT = data.table(A=c("foo","ba|r","baz")) test(1736.07, capture.output(fwrite(DT,na="")), c("A","foo","ba|r","baz")) # no list column so no need to quote test(1736.08, capture.output(fwrite(DT)), c("A","foo","ba|r","baz")) diff --git a/man/fwrite.Rd b/man/fwrite.Rd index efe6582200..95262c3896 100644 --- a/man/fwrite.Rd +++ b/man/fwrite.Rd @@ -12,7 +12,6 @@ fwrite(x, file = "", append = FALSE, quote = "auto", na = "", dec = ".", row.names = FALSE, col.names = TRUE, qmethod = c("double","escape"), logical01 = getOption("datatable.logical01", FALSE), # due to change to TRUE; see NEWS - logicalAsInt = NULL, # deprecated scipen = getOption('scipen', 0L), dateTimeAs = c("ISO","squash","epoch","write.csv"), buffMB = 8L, nThread = getDTthreads(verbose), @@ -42,7 +41,6 @@ fwrite(x, file = "", append = FALSE, quote = "auto", \item "double" (default, same as \code{write.csv}), in which case the double quote is doubled with another one. }} \item{logical01}{Should \code{logical} values be written as \code{1} and \code{0} rather than \code{"TRUE"} and \code{"FALSE"}?} - \item{logicalAsInt}{Deprecated. Old name for `logical01`. Name change for consistency with `fread` for which `logicalAsInt` would not make sense.} \item{scipen}{ \code{integer} In terms of printing width, how much of a bias should there be towards printing whole numbers rather than scientific notation? See Details. } \item{dateTimeAs}{ How \code{Date}/\code{IDate}, \code{ITime} and \code{POSIXct} items are written. \itemize{