简体   繁体   中英

Error in readRDS(nsInfoFilePath) : error reading from connection

I found this error when I was dealing with the swirl assignment:

You're probably sick of it but rerun qplot again, this time with 4 arguments. The first 3 are the same as the last qplot command you just ran (price, data set equal to diamonds, and binwidth set equal to 18497/30). (Use the up arrow to save yourself some typing.) The fourth argument is fill set equal to cut. The shape of the histogram will be familiar, but it will be more colorful.

qplot(price, data = diamonds, binwidth = 18497/30, fill = cut)

Error in readRDS(nsInfoFilePath): error reading from connection

I cannot solve this problem even after a long search on the internet

I encountered the same error while using ggplot2, even with very simple data and graph.

I traced the readRDS function with the following code:

trace(readRDS, quote(print(ls.str())))

which after running the ggplot code returned something like:

Tracing readRDS(metapath) on entry
file :  chr "/home/username/R/x86_64-pc-linux-gnu-library/4.1/farver/Meta/package.rds"
refhook :  NULL

I reinstalled the farver package, the error disappeared and I was finally able to plot the graph I wanted.

This package (and the package.rds file) was probably not installed correctly.

I found a similar issue and the tracing command here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM