R/utils.R

Defines functions meshgrid2d

meshgrid2d <- function(xx,yy){
  xnum <- length(xx)
  ynum <- length(yy)
  out <- matrix(0, nrow=xnum*ynum, ncol=2)
  out[,1] <- rep(xx,ynum)
  out[,2] <- rep(yy,each=xnum)
  return(out)
}

Try the stxplore package in your browser

Any scripts or data that you put into this service are public.

stxplore documentation built on Feb. 16, 2023, 9:53 p.m.