[R] Recovering former projects on R

David Winsemius dw|n@em|u@ @end|ng |rom comc@@t@net
Fri Jun 21 23:38:07 CEST 2019


On 6/21/19 2:34 PM, Spencer Brackett wrote:
> Thank you, I called them but was able to load what appears to be a reprex
> of my Rhistory. If I remember correctly, there is a way to to reimplement
> this history into your console so to regenerate previous work. How is this
> done?


Assuming you still have teh data files stored in the same locations as 
they were when the history was recorded you should be able to use teh 
`source` function. Or you could create an *.R file and execute it from 
your OS file viewer if you have the R extension associated with the R 
executable.


?source

-- 

David.


>
> Best,
>
> Spencer
>
> On Fri, Jun 21, 2019 at 4:51 PM William Dunlap <wdunlap using tibco.com> wrote:
>
>> You should ask someone at RStudio about this, but *.Rproj files are not
>> something R itself knows about.  load() reads files made by save(), which
>> usually have the extension ".Rdata" or ".rda".
>>
>> Bill Dunlap
>> TIBCO Software
>> wdunlap tibco.com
>>
>>
>> On Fri, Jun 21, 2019 at 1:43 PM Spencer Brackett <
>> spbrackett20 using saintjosephhs.com> wrote:
>>
>>> Good evening,
>>>
>>>    I am revisiting a project I had saved to R studio and after working with
>>> it for a little, with loaded data and environments shown just as I left
>>> them when I stopped working on the project, my console and the tabs opened
>>> went blank. I believe I accidentally activated q() and quit the project. I
>>> tried to re-access the same file with all of the work I’ve done for this
>>> project saved onto it, and I got the following...
>>>
>>>
>>>   load("~/R/GBM P-EXP/GBM P-EXP.Rproj")
>>> Error in load("~/R/GBM P-EXP/GBM P-EXP.Rproj") :
>>>    bad restore file magic number (file may be corrupted) -- no data loaded
>>> In addition: Warning message:
>>> file ‘GBM P-EXP.Rproj’ has magic number 'Versi'
>>>    Use of save versions prior to 2 is deprecated
>>>
>>> Does this mean that I lost all of my previous work, or is there another
>>> way
>>> to recover all the coding and loaded environments that I had saved to this
>>> file?  For context, I also tried accessing the project through a desktop
>>> version of the file saved on my desktop through R Studio, but this also
>>> just generated a blank terminal with no loaded environments.
>>>
>>> Any advice would be greatly appreciated!
>>>
>>> Best,
>>>
>>> Spencer Brackett
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help using 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.
>>>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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.



More information about the R-help mailing list