You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
31.`rbind()`and`rbindlist()`nowsupport`fill=TRUE`with`use.names=FALSE`insteadofissuingthewarning`use.names= cannot be FALSE when fill is TRUE. Setting use.names=TRUE.`
211
+
212
+
```R
213
+
DT1
214
+
# A B
215
+
# <int> <int>
216
+
# 1: 1 5
217
+
# 2: 2 6
218
+
219
+
DT2
220
+
# foo
221
+
# <int>
222
+
# 1: 3
223
+
# 2: 4
224
+
225
+
rbind(DT1, DT2, fill=TRUE) # no change
226
+
# A B foo
227
+
# <int> <int> <int>
228
+
# 1: 1 5 NA
229
+
# 2: 2 6 NA
230
+
# 3: NA NA 3
231
+
# 4: NA NA 4
232
+
233
+
rbind(DT1, DT2, fill=TRUE, use.names=FALSE)
234
+
235
+
# was:
236
+
# A B foo
237
+
# <int> <int> <int>
238
+
# 1: 1 5 NA
239
+
# 2: 2 6 NA
240
+
# 3: NA NA 3
241
+
# 4: NA NA 4
242
+
# Warning message:
243
+
# In rbindlist(l, use.names, fill, idcol) :
244
+
# use.names= cannot be FALSE when fill is TRUE. Setting use.names=TRUE.
\item{l}{ Alistcontaining \code{data.table}, \code{data.frame} or \code{list} objects. \code{\dots} isthesamebutyoupasstheobjectsbynameseparately. }
15
15
\item{use.names}{\code{TRUE} bindsbymatchingcolumnname, \code{FALSE} byposition. `check` (default) warnsifallitemsdon't have the same names in the same order and then currently proceeds as if `use.names=FALSE` for backwards compatibility (\code{TRUE} in future); see news for v1.12.2.}
16
-
\item{fill}{\code{TRUE} fills missing columns with NAs. By default \code{FALSE}. When \code{TRUE}, \code{use.names} is set to \code{TRUE}.}
16
+
\item{fill}{\code{TRUE} fills missing columns with NAs. By default \code{FALSE}.}
17
17
\item{idcol}{Creates a column in the result showing which list item those rows came from. \code{TRUE} names this column \code{".id"}. \code{idcol="file"} names this column \code{"file"}. If the input list has names, those names are the values placed in this id column, otherwise the values are an integer vector \code{1:length(l)}. See \code{examples}.}
0 commit comments