I am trying to avoid running ~250 Clark and Evans tests (clarkevans.test) manually.
I have a table of xmin, xmax, ymin, ymax coordinates in an excel file where each row are the dimensions an operating window.
After reading the excel file (read.csv) into R I can't seem to get any form of "apply" and "owin" to work in conjunction to output an owin for each row. Eventually I'll need to create ppp and run clarkevans.test in a similar fashion, but right now I just need help on this first step.
coordin<-read.csv("Coordin.csv")
cdf<-data.frame(coordin)
> cdf
xmin xmax ymin ymax
1 456741 456841 3913505 3913605
2 453341 453441 3915805 3915905
3 453441 453541 3915805 3915905
4 452441 452541 3915705 3915805
5 453741 453841 3915705 3915805
I've tried several variations, but I can't get anything to work.
lapply(cdf, function(x) owin(xmin, xmax, ymin, ymax))