Skip to content

Commit

Permalink
Fixed setDT.Rd, #1338.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsrinivasan committed Sep 17, 2015
1 parent 044dcc3 commit 2629931
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion man/setDT.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

}
\usage{
setDT(x, keep.rownames=FALSE, key=NULL)
setDT(x, keep.rownames=FALSE, key=NULL, check.names=FALSE)
}
\arguments{
\item{x}{ A named or unnamed \code{list}, \code{data.frame} or \code{data.table}. }
\item{keep.rownames}{ For \code{data.frame}s, \code{TRUE} retains the \code{data.frame}'s row names under a new column \code{rn}. }
\item{key}{Character vector of one or more column names which is passed to \code{\link{setkeyv}}. It may be a single comma separated string such as \code{key="x,y,z"}, or a vector of names such as \code{key=c("x","y","z")}. }
\item{check.names}{ Just as \code{check.names} in \code{\link{data.frame}}. }
}
\details{
Expand Down Expand Up @@ -48,6 +49,11 @@ setDT(X, FALSE)
# setkey directly
X = list(a = 4:1, b=runif(4))
setDT(X, key="a")[]

# check.names argument
X = list(a=1:5, a=6:10)
setDT(X, check.names=TRUE)[]

}
\keyword{ data }

0 comments on commit 2629931

Please sign in to comment.