Error in Load- Please your helpful advice


#1

Hello,
I tried to load my R workspace (RStudio on MacOS) and received this error:

Error in load("~/Downloads/001_Data.xlsx") : **
** bad restore file magic number (file may be corrupted) -- no data loaded

In addition: Warning message:
file ‘001_Data.xlsx’ has magic number 'PK'
** Use of save versions prior to 2 is deprecated**

I would like your support.
Thanks a lot


#2

This is because .xlsx is not a valid filetype for load() in R.

There are several packages that allow you to read Excel files into R, though. Personally, I use readxl, but there are several others mentioned in the StackOverflow thread below: