Skip to content
Prev 105728 / 398503 Next

making a grid of points

I'd like to evaluate a function at each point on a 2 or 3-D grid.  Is
there some function that already does this, or generates the grid of
points?

My search has led me to the grid and lattice packages, and I found a
reference to the sp package (e.g., SpatialGrid) for this.  There are
things in there that might be relevant, but at first blush many of them
are embedded in other concepts (grobs, shingles, rugs) and don't
obviously solve the problem.

I know this is not a hard thing to program, but I suspect someone has
already done it.  Any pointers?

Thanks.