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

25 views
Skip to first unread message

aditya banerjee

unread,
Jul 4, 2024, 6:39:37 AMJul 4
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 PMJul 10
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
Reply all
Reply to author
Forward
0 new messages