Skip to content

Commit d5e76c6

Browse files
missed setcbindlist in Rd
1 parent 71219c6 commit d5e76c6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

man/cbindlist.Rd

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
\name{cbindlist}
22
\alias{cbindlist}
3+
\alias{setcbindlist}
34
\alias{cbind}
45
\alias{cbind.data.table}
56
\title{Column bind multiple data.tables}
67
\description{
78
Column bind multiple \code{data.table}s.
89
}
910
\usage{
10-
cbindlist(l, copy=TRUE)
11+
cbindlist(l)
12+
setcbindlist(l)
1113
}
1214
\arguments{
1315
\item{l}{ \code{list} of \code{data.table}s to merge. }
14-
\item{copy}{ Logical, default \code{FALSE}. If \code{TRUE}, the resulting columns will be a shared reference to the originals, otherwise copies will be made. }
1516
}
1617
\details{
1718
Column bind only stacks input elements. Works like \code{\link{data.table}}, but takes \code{list} type on input. Zero-column tables in \code{l} are omitted. Tables in \code{l} should have matching row count; recycling of length-1 rows is not yet implemented. Indices of the input tables are transferred to the resulting table, as well as the \emph{key} of the first keyed table.
1819
}
1920
\value{
20-
A new \code{data.table} based on the stacked objects. Eventually when \code{copy} is \code{FALSE}, then resulting object will share columns with \code{l} tables.
21+
A new \code{data.table} based on the stacked objects.
22+
23+
For \code{setcbindlist}, columns in the output will be shared with the input, i.e., \emph{no copy is made}.
2124
}
2225
\note{
23-
If output object has any duplicate names, then key and indices are removed.
26+
No attempt is made to deduplicate resulting names. If the result has any duplicate names, keys and indices are removed.
2427
}
2528
\seealso{
26-
\code{\link{data.table}}, \code{\link{rbindlist}}
29+
\code{\link{data.table}}, \code{\link{rbindlist}}, \code{\link{setDT}}
2730
}
2831
\examples{
2932
d1 = data.table(x=1:3, v1=1L, key="x")
3033
d2 = data.table(y=3:1, v2=2L, key="y")
3134
d3 = data.table(z=2:4, v3=3L)
3235
cbindlist(list(d1, d2, d3))
3336
cbindlist(list(d1, d1))
34-
d4 = cbindlist(list(d1), copy=FALSE)
37+
d4 = setcbindlist(list(d1))
3538
d4[, v1:=2L]
3639
identical(d4, d1)
3740
}

0 commit comments

Comments
 (0)