Description Usage Arguments Details Value Examples
Embed a character vector into one-hot encoded array
1 | embedLetters(names, max.length = 12)
|
names |
Character vector |
max.length |
Numeric representing number of letters to keep for each name.
Names shorter than |
One-hot encoding will have dimension 28 for 27 lower case letters as well as a space
Binary array with dimension: length(names) x max.length x 28
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Sample names
names <- c('amy', 'john', 'cathy')
# Embed
embedded <- embedLetters(names, max.length = 12)
dim(embedded)
> [1] 3 12 28
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.