Error in file.rename...'from' and 'to' are of different lengths

125 views
Skip to first unread message

aditya banerjee

unread,
Jul 4, 2024, 6:39:37 AM7/4/24
to Wallace Ecological Modeling App
Dear All,

While loading the background extent, I am getting the following error:

Error in file.rename(bgShp_path, file.path(pathdir, bgShp_name)) : 'from' and 'to' are of different lengths.

I ran the following code, closely following code obtained from exporting an Rmd of a Wallace GUI session:

bgPath_Pv <- "pathname"
bgExt_Pv <- penvs_userBgExtent(
bgShp_path = paste0(bgPath_Pv, "vector name", ".shp"),
  bgShp_name = paste0("vector name", c(".shp", ".shx", ".dbf")),
  userBgBuf = 0,
  occs = occs_Pv)

Could you tell me why I'm getting this error message?

Regards

Wallace Ecological Modeling App

unread,
Jul 10, 2024, 3:07:29 PM7/10/24
to Wallace Ecological Modeling App

First, make sure you are adding a slash ('/') at the end of the pathname to indicate its a folder location.
Example:
bgPath_Pv <- "/Users/name/Desktop/folder/Shapefiles/"

If, after this, you are seeing an error message regarding 'identicalCRS(x, y) is not TRUE' there may be a bug with the Rmd code and I can see about debugging. Let me know if you are also seeing that second error message, and to confirm it's only happening when running the Rmd, correct? and not in the GUI?

-Bethany

Valentina Grisales Betancur

unread,
Feb 19, 2025, 12:45:26 PMFeb 19
to Wallace Ecological Modeling App

Hi Bethany,

I hope you're doing well!

I'm trying to run the Rmd of a model, but I'm encountering the same error you mentioned earlier:

Error in .local(x, y, returnList, fn, ...): identicalCRS(x, y) is not TRUE

Did you manage to find a solution for it?

Thanks in advance for your help!

Best,
Valen

Reply all
Reply to author
Forward
0 new messages