Package or namespace load failed: unknown input format


I installed the newest version of R over the weekend from version "3.6" to "4.0.3". Since I have updated the newest version I cannot call in libraries or import non-csv files (such as Excel) using "library()". Below is the error message I receive: "Error: package or namespace load failed for ‘readxl’ in readRDS(nsInfoFilePath): unknown input format", and I encounter the same error for other packages (such as dplyr and ggplot2). Last week I had no problems knitting an RMarkdown file and now I encounter an error of "Error in readRDS(ffile) : unknown input format Calls: :: ... loadNamespace -> namespaceImport -> loadNamespace -> readRDS Execution halted".

I've tried uninstalling R and RStudio completely and reinstalling which has encountered the same error. I've looked in previous discussions for any way to fix this issue, and all have been without success. Any thoughts on how to fix it would be greatly appreciated!


did you reinstall the package??

Yes - I have uninstalled and reinstalled the packages as well and encounter the same error.

I guess readxl is dependent upon c++ and with 4.0 the rtools have been updated. if you are on windows you must try to update it and then reinstall the package. If not I would more information like sessionInfo() for help.

Interesting - I've never had a problem previously with importing datasets before or using readxl, so I'm not quite sure what C++ would do to solve this issue. This is what I get when I run sessionInfo():

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3

sessionInfo() shows you only the information of R. I am just saying that maybe this could be the issue if it works on 3.6 but not in 4.0. Rtools is a software you install on windows along with the R. Because you have such issue in multiple packages it's worth reinstalling the latest version.

Can you show us the install.packages console output that occurs when you install readxl, it would be good to confirm there is no complaint, before looking at the library(readxl) console response.
please use triple backticks to format such code copy paste like

my code is formatted
1 Like

This topic was automatically closed 21 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.