Skip to content

Commit 9762c01

Browse files
Remove defunct 'logicalAsInt`
1 parent f78044e commit 9762c01

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
# data.table [v1.17.99](https://github.com/Rdatatable/data.table/milestone/35) (in development)
44

5+
## NOTES
6+
7+
1. The following in-progress deprecations have proceeded:
58

9+
+ Argument `logicalAsInt` to `fwrite()` has been removed.
610

711
# data.table [v1.17.0](https://github.com/Rdatatable/data.table/milestone/34) (20 Feb 2025)
812

R/fwrite.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ fwrite = function(x, file="", append=FALSE, quote="auto",
33
sep2=c("","|",""), eol=if (.Platform$OS.type=="windows") "\r\n" else "\n",
44
na="", dec=".", row.names=FALSE, col.names=TRUE,
55
qmethod=c("double","escape"),
6-
logical01=getOption("datatable.logical01", FALSE), # due to change to TRUE; see NEWS
7-
logicalAsInt=NULL,
6+
logical01=getOption("datatable.logical01", FALSE),
87
scipen=getOption('scipen', 0L),
98
dateTimeAs = c("ISO","squash","epoch","write.csv"),
109
buffMB=8L, nThread=getDTthreads(verbose),
@@ -23,9 +22,6 @@ fwrite = function(x, file="", append=FALSE, quote="auto",
2322
compress = match.arg(compress)
2423
dateTimeAs = match.arg(dateTimeAs)
2524
dateTimeAs = chmatch(dateTimeAs, c("ISO", "squash", "epoch", "write.csv")) - 1L
26-
if (!is.null(logicalAsInt)) {
27-
stopf("logicalAsInt has been renamed logical01 for consistency with fread.")
28-
}
2925
scipen = if (is.numeric(scipen)) as.integer(scipen) else 0L
3026
buffMB = as.integer(buffMB)
3127
nThread = as.integer(nThread)

inst/tests/tests.Rraw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10930,7 +10930,7 @@ test(1736.03, fwrite(DT, sep2=c("",",","")), error="sep.*,.*sep2.*,.*must all be
1093010930
test(1736.04, fwrite(DT, sep2=c("","||","")), error="nchar.*sep2.*2")
1093110931
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)",
1093210932
"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)"))
10933-
test(1736.06, fwrite(DT, sep='|', sep2=c("{",",","}"), logicalAsInt=TRUE), error="logicalAsInt has been renamed logical01")
10933+
# 1736.06 was of defunct logicalAsInt argument
1093410934
DT = data.table(A=c("foo","ba|r","baz"))
1093510935
test(1736.07, capture.output(fwrite(DT,na="")), c("A","foo","ba|r","baz")) # no list column so no need to quote
1093610936
test(1736.08, capture.output(fwrite(DT)), c("A","foo","ba|r","baz"))

man/fwrite.Rd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ fwrite(x, file = "", append = FALSE, quote = "auto",
1212
na = "", dec = ".", row.names = FALSE, col.names = TRUE,
1313
qmethod = c("double","escape"),
1414
logical01 = getOption("datatable.logical01", FALSE), # due to change to TRUE; see NEWS
15-
logicalAsInt = NULL, # deprecated
1615
scipen = getOption('scipen', 0L),
1716
dateTimeAs = c("ISO","squash","epoch","write.csv"),
1817
buffMB = 8L, nThread = getDTthreads(verbose),
@@ -42,7 +41,6 @@ fwrite(x, file = "", append = FALSE, quote = "auto",
4241
\item "double" (default, same as \code{write.csv}), in which case the double quote is doubled with another one.
4342
}}
4443
\item{logical01}{Should \code{logical} values be written as \code{1} and \code{0} rather than \code{"TRUE"} and \code{"FALSE"}?}
45-
\item{logicalAsInt}{Deprecated. Old name for `logical01`. Name change for consistency with `fread` for which `logicalAsInt` would not make sense.}
4644
\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. }
4745
\item{dateTimeAs}{ How \code{Date}/\code{IDate}, \code{ITime} and \code{POSIXct} items are written.
4846
\itemize{

0 commit comments

Comments
 (0)