expand_grid_cpp {spBPS}R Documentation

Build a grid from two vector (i.e. equivalent to expand.grid() in R)

Description

Build a grid from two vector (i.e. equivalent to expand.grid() in R)

Usage

expand_grid_cpp(x, y)

Arguments

x

vector first vector of numeric elements

y

vector second vector of numeric elements

Value

matrix expanded grid of combinations

Examples

## 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)


[Package spBPS version 0.0-4 Index]