Error in file(x, "rb") : cannot open the connection

#1

I am new to R and am trying to deploy a Code that was developed in R 3.2.3 but it is giving me the following error.

Error in file(x, "rb") : cannot open the connection

Any suggestions on how to work around this.
Currently using R version 3.5.2 with windows 10 operating system

Load the saved raster stack into R <=============

stk.save <- stackOpen("01June2016_RS3_RasterStackOut.stk")
Error in file(x, "rb") : cannot open the connection

0 Likes

#2

That message generally means that that either you don't have write privileges to the file or that you have the file open in another application and thus cannot write to it.

On a separate note, R 3.2.3 is very old. You should consider upgrading (3.5.3 has just been released).

0 Likes

#4

Thank you.
I discovered that the location of the rasters has been changed and as a result, the raster stack is no longer valid.

0 Likes

closed #5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes