expand_grid_cpp: Build a grid from two vector (i.e. equivalent to...

View source: R/RcppExports.R

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


spBPS documentation built on Oct. 25, 2024, 5:07 p.m.