orderByString | R Documentation |
find the order of a string vector so it will match the order of another
orderByString(x, y)
x |
a vector of strings |
y |
a vector of strings |
a vector of strings
## Not run:
a <- c("c", "a", "b")
b <- c("b", "c", "a")
index <- orderByString(a, b) # to order b like a needs what indexes?
index
b[index]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.