![](/uploads/1/2/5/2/125283465/409922426.jpg)
I tried to load my R workspace and received this error:
I'm not particularly interested in the technical details, but mostly in how I caused it and how I can prevent it in the future. Here's some notes on the situation:
My ISP still giving me fits and starts. My internet was out for most of yesterday. Today it is not very good but I have it. Sorry to rant but Verizon DSL is crap. I need to get cable. Both of your references point to articles about unreg / rereg of the msiexec. Did you mean to do that?
- I'm running R 2.15.1 on a MacBook Pro running Windows XP on a bootcamp partition.
- There is something obviously wrong this workspace file, since it weighs in at only ~80kb while all my others are usually >10,000
- Over the weekend I was running an external modeling program in R and storing its output to different objects. I ran several iterations of the model over the course of several days, eg output_Saturday <- call_model()
- There is nothing special to the model output, its just a list with slots for betas, VC-matrices, model specification, etc.
31.8k77 gold badges6969 silver badges109109 bronze badges
N BrouwerN Brouwer1,70855 gold badges2020 silver badges3030 bronze badges
7 Answers
I got that error when I accidentally used
Laurenz Albeload()
instead of source()
or readRDS()
.57.8k1111 gold badges4040 silver badges6060 bronze badges
Chris SHChris SH
Assuming your file is named 'myfile.ext'
If the file you're trying to load is not an R-script, for which you would use
you might try the
David ArenburgreadRDS
function and assign it to a variable-name:79.9k1212 gold badges100100 silver badges167167 bronze badges
user2643170user2643170
The magic number comes from UNIX-type systems where the first few bytes of a file held a marker indicating the file type.
This error indicates you are trying to load a non-valid file type into R. For some reason, R no longer recognizes this file as an R workspace file.
Ellis ValentinerEllis Valentiner
Install the
zx8754readr
package, then use library(readr)
.![Error Error](https://support.alldata.com/images/stories/userdocs/Manage/application-error/1-error-msg.png)
31.8k77 gold badges6969 silver badges109109 bronze badges
Aurelia AuritaAurelia Aurita
It also occurs when you try to
load()
an rds object instead of using DCZDCZ
If you are working with
devtools
try to save the files with:Then, delete all files saved previously.
From doc:
internal If FALSE, saves each object in individual .rda files in the data directory. These are available whenever the package is loaded. If TRUE, stores all objects in a single R/sysdata.rda file. These objects are only available within the package.
![Error Error](/uploads/1/2/5/2/125283465/394339653.jpg)
79.9k1212 gold badges100100 silver badges167167 bronze badges
mariopemariope
I had this problem when I saved the Rdata file in an older version of R and then I tried to open in a new one. I solved by updating my R version to the newest.
Juan Manuel Ortiz de ZarateJuan Manuel Ortiz de Zarate
protected by zx8754Jan 30 '18 at 9:03
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged rworkspacemagic-numbers or ask your own question.
![](/uploads/1/2/5/2/125283465/409922426.jpg)