Skip to content

Commit

Permalink
Closes # 1699, subtle point of explication in melt dox
Browse files Browse the repository at this point in the history
whoops
  • Loading branch information
MichaelChirico committed Aug 10, 2017
1 parent e83c34c commit 6437417
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Expand Up @@ -82,6 +82,8 @@

5. Printing with `quote = TRUE` now quotes column names as well, [#1319](https://github.com/Rdatatable/data.table/issues/1319). Thanks @jan-glx for the suggestion and @MichaelChirico for the PR.

6. Added a blurb to `?melt.data.table` explicating the subtle difference in behavior of the `id.vars` argument vis-a-vis its analog in `reshape2::melt`, [#1699](https://github.com/Rdatatable/data.table/issues/1699). Thanks @MichaelChirico for uncovering and filing.


### Changes in v1.10.4 (on CRAN 01 Feb 2017)

Expand Down
5 changes: 4 additions & 1 deletion man/melt.data.table.Rd
Expand Up @@ -22,7 +22,7 @@ load \code{reshape2} package \emph{before} loading \code{data.table}.
\item{data}{ A \code{data.table} object to melt.}
\item{id.vars}{vector of id variables. Can be integer (corresponding id
column numbers) or character (id column names) vector. If missing, all
non-measure columns will be assigned to it.}
non-measure columns will be assigned to it. If integer, must be positive; see Details. }
\item{measure.vars}{vector of measure variables. Can be integer (corresponding
measure column numbers) or character (measure column names) vector. If missing,
all non-id columns will be assigned to it.
Expand Down Expand Up @@ -77,7 +77,10 @@ be coerced to \code{character} type. This is to be compatible with
\code{reshape2}'s \code{melt.data.frame}. To get a \code{factor} column, set
\code{value.factor = TRUE}. \code{melt.data.table} also preserves
\code{ordered} factors.
Note that, as opposed to the (undocumented) behavior of \code{reshape2::melt}, \code{id.vars}, when specified as numbers, must be between 1 and \code{ncol(data)}.
}
\value{
An unkeyed \code{data.table} containing the molten data.
}
Expand Down

0 comments on commit 6437417

Please sign in to comment.