inlabru-org / inlabru

inlabru
https://inlabru-org.github.io/inlabru/
91 stars 21 forks source link

Error with lgcp #184

Closed JacopoCerri closed 1 year ago

JacopoCerri commented 1 year ago

Hi,

I am trying to replicate your example to fit a latent Gaussian Cox process. However, when using either the "lcp" command or the "bru" command I have this message of error

# Error in row_kron(A[[k + 1]], A_) : 
  no slot of name "j" for this object of class "dgCMatrix"

I am having this problem both with my data and with the gorilla dataset. Do you what might cause it?

Best,

Jacopo Cerri

finnlindgren commented 1 year ago

Looks identical to issue #162 that was fixed by the release of version 2.6.0. The current CRAN version is 2.7.0. What version did you use to get the error?

JacopoCerri commented 1 year ago

Uhm... when I had this error I was using an older version. Then I updated both INLA (now 22.12.16) and inlabru (2.7.0) The problem is that now I have another error, when running the gorilla example. It tells me that...

Error in CPL_proj_direct(from_to, as.matrix(pts), keep, warn, authority_compliant) : pts should be 2-column numeric vector

finnlindgren commented 1 year ago

What versions of sp, sf, and rgdal? Also, what’s the traceback() output after the error, and precisely what line of code did you run that gave the error?

JacopoCerri commented 1 year ago

Hi,

I updated these three packages to the last version and now the gorilla example works fine.

Jacopo

finnlindgren commented 1 year ago

Great! I saw a note on an sf package update about allowing more than 2-columns in st_project, so that is the likely root of the issue in older versions.