expand_grid_cpp | R Documentation |
expand.grid()
in R
)Build a grid from two vector (i.e. equivalent to expand.grid()
in R
)
expand_grid_cpp(x, y)
x |
vector first vector of numeric elements |
y |
vector second vector of numeric elements |
matrix expanded grid of combinations
## Create a matrix from all combination of vectors
x <- seq(0, 10, length.out = 100)
y <- seq(-1, 1, length.out = 20)
grid <- expand_grid_cpp(x = x, y = y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.