[R] Grid building in R
Dylan Beaudette
dylan.beaudette at gmail.com
Thu Jul 10 01:19:05 CEST 2008
On Wednesday 09 July 2008, hippie dream wrote:
> This might not possible in R but I thought I would give it shot. I am have
> to set up a 40 x 40 cm grid of 181 points equidistant from each other. Is
> there any way to produce a graph with R that can do this for me? Actual
> sizes are unimportant as long it is to scale. Thanks
how about:
# 40cm spacing
spacings <- 0:13*40
# a square grid with 196 points
# sqrt(181) is not an integer, sorry!
g <- expand.grid(x=spacings, y=spacings)
# check it out
plot(g, pch=3, cex=0.5)
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
More information about the R-help
mailing list