Hi Alex, > In the picture are depicted the areas that I need to calculate somehow. Of > course the easiest way would be to use some already implemented function > which does not seem to exist.
That was why I posted a function to calculate polygon area in my previous reply :) Have you tried that approach ? Michael On 6 October 2010 22:21, alaios <ala...@yahoo.com> wrote: > > I would like to thank you for your reply. > Yes I had this conversation of how to find the cells that are touched. > > > I did that with these two lines: > temp<-(floor(cbind(seq(x[1],xr[1],by=0.01),lineeq(x,xr)))) #. > cellid2 <-unique( floor(cbind(seq(x[1],xr[1], by=0.01), lineeq(x,xr)) ) ) # > cell ids that are touched > > You can find in the picture below how the cells look like for a line that > spans from (2,11) to (3,8) > > http://img824.imageshack.us/img824/9914/lineu.jpg > > In the picture attached you can see that there are some points missing > denoted by * which I do not know how to find out. I need them to find the > proportion a line gets into each cell. > You mentioned something like "densified vertices of the line" but I am not > sure what does it mean. > > In the picture are depicted the areas that I need to calculate somehow. Of > course the easiest way would be to use some already implemented function > which does not seem to exist. > > I would like to thank everyone that contributed to this so far. > Best Regards > Alex > > -- > View this message in context: > http://r.789695.n4.nabble.com/Linear-Integration-tp2956145p2964694.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > ______________________________________________ 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.