[R-sig-Geo] gdistance resistanceDistance error
ignacio.quintero
ignacioquinterom at gmail.com
Wed May 9 03:47:51 CEST 2012
Dear Jacob,
Hope you don't mind if I don't write in the post but directly to you. Actually, as you might suppose, the data is too heavy in order for me to send it. However, I will summ it up: the data is a grid of the American continent with a ~0.05x0.05 degree resolution and values that correspond to the probability of presence (ranging from ~1.5e-7 to ~0.9). There are more than 5000000 cells, but about 2/3 are NA's (is this what is causing the trouble?) I have looked how to remove this NA cells without success (when I rasterize the points, the grid automatically adds a rectangular grid with NAs where no data is found).
Any help would be most appreciated,
Best
Ignacio
On May 8, 2012, at 6:54 PM, Jacob van Etten [via R-sig-geo] wrote:
> Dear Ignacio,
>
> The problem may also have to do with the values in the TransitionMatrix. A reproducible example would be good to have.
>
> Jacob
>
> On 8/05/2012, at 18:32, "ignacio.quintero" <[hidden email]> wrote:
>
> > Dear all,
> >
> > I have came across the same error using resistanceDistance (and not
> > costDistance with same data):
> >
> > "#Get matrix of resistance distances.
> > Error in Cholesky(Lr) : CHOLMOD factorization was unsuccessful
> > In addition: Warning message:
> > In Cholesky(Lr) :
> > Cholmod warning 'not positive definite' at
> > file:../Cholesky/t_cholmod_rowfac.c, line 432"
> >
> > I was using also a very large raster grid (~5000000 cells). This seems to be
> > the problem (do not know if because of memory): I cropped the same big
> > raster into a smaller one containing the locality points (and, of course, a
> > big frame outside; however, currently, I do not know if the frame extent
> > will change the results...) and it worked perfectly.
> >
> > Hope this helps (although I would like to know the exact problem (memory or
> > other issue) with the resistanceDistance function)
> >
> > Best,
> >
> > Ignacio
> >
> > --
> > View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541017.html
> > Sent from the R-sig-geo mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > [hidden email]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541075.html
> To unsubscribe from gdistance resistanceDistance error, click here.
> NAML
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541430.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list