View source: R/splitstackshape_helper_functions.R
| charMat | R Documentation |
Create a binary matrix from a list of character values
charMat(listOfValues, fill = NA, mode = "binary")
listOfValues |
A |
fill |
The initializing fill value for the empty matrix. |
mode |
Either |
This is primarily a helper function for the concat.split() function when
creating the "expanded" structure. The input is anticipated to be a list of
values obtained using base::strsplit().
A matrix.
Ananda Mahto
base::strsplit(), numMat().
invec <- c("rock,electro","electro","rock,jazz")
A <- strsplit(invec, ",")
splitstackshape:::charMat(A)
splitstackshape:::charMat(A, 0)
splitstackshape:::charMat(A, mode = "value")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.