Wouldn't the obvious problem be that your data file is corrupted or was never created using saveRDS in the first place? Can you show us a complete example of creating and attempting to read what was just created?
On April 22, 2018 10:20:05 AM CDT, mohammad moradi <mri.mor...@gmail.com> wrote: >Hi there, > >I faced a weird problem doing a seemingly simple task in R. >Specifically, >when trying for reading an RDS file from the working directory, the >following error is appeared. > >Code: > >records <- readRDS("tweets.rds") > > >Error: > >Error in readRDS("tweets.rds") : error reading from connection >In addition: Warning message: >In readRDS("tweets.rds") : invalid or incomplete compressed data > > >Thanks, > >Mohammad > > [[alternative HTML version deleted]] > >______________________________________________ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. -- Sent from my phone. Please excuse my brevity. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.