rxExpandGrid | R Documentation |
Only support x and y as characters right now
rxExpandGrid(x, y, type = 0L)
x |
first element (must be character) |
y |
second element (must be character) |
type |
Internal type=0L is traditional expand grid and type=1L is jacobian expand grid (adds symbols) |
Expand grid
Matthew Fidler
## rxExpandGrid(letters, letters) ## Another fast method; See ## https://stackoverflow.com/questions/10405637/use-outer-instead-of-expand-grid expand.grid.jc <- function(seq1, seq2) { cbind( Var1 = rep.int(seq1, length(seq2)), Var2 = rep.int(seq2, rep.int(length(seq1), length(seq2))) ) } microbenchmark::microbenchmark(rxExpandGrid(letters, letters), expand.grid.jc(letters, letters))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.