On 09/05/2008 5:55 PM, mtrp mtrp wrote:
Hi,
I am new to R. I am using spatstat package to generate some sample points but
don't know how to save the result to file. Could anyone please give me some
instructions? Thanks
I generate some random point data by using:
pp<-runifpoint(100)
I can plot it out with plot(pp)
I suppose that pp contains x and y. How can I save these x, y pairs to file
that has following format?
x1,y1
x2,y2
...
write.csv(cbind(pp$x, pp$y), file="my.file") should do it.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.