A wrapper for data.table::melt()
in the common case where candidates are in
columns and cells give votes.
1 2 3 | melt_votes(.data, ..., na.rm = TRUE, value.name = "votes",
variable.name = "candidate", variable.factor = FALSE,
value.factor = FALSE)
|
.data |
A table of returns. |
... |
any other arguments to be passed to/from other methods. |
na.rm |
If |
value.name |
name for the molten data values column(s). The default name is |
variable.name |
name for the measured variable names column. The default name is |
variable.factor |
If |
value.factor |
If |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.