Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in gzfile(file, "rb") - what should I do?

Tags:

r

I'm going to write shortly, because my english is not perfect.

My code is:

explanatory=readRDS("explanatory_complete.Rds")

And I want knit pdf or word document, I receive this message:

Error in gzfile(file, "rb")- can't oppen connection

Where is problem? I set the right working directory.

like image 503
Adrian Bruzda Avatar asked Jun 08 '15 19:06

Adrian Bruzda


2 Answers

Try with explanatory<-readRDS('filename.rds') this works for me.

like image 83
Aaron MZH Avatar answered Sep 19 '22 15:09

Aaron MZH


Not sure if this is your case but I ran into

Error in gzfile(file, "rb")- can't open connection

when I tried to read a large file after it was downloaded using rsync. This was due to different file access permissions set by rsync than my Windows 10 system. The error was fixed in a local MobaXterm session using

chmod u+rwx filename

(change filename to your files)

like image 30
tlyim Avatar answered Sep 23 '22 15:09

tlyim