RStudio has a panel with a tab 'History' (that panel also has tabs
'Environment' and 'Connections').
If you click on the 'History' tab and can see your relevant history, you
can then highlight commands of interest and click the 'To Console' button.
This copies the highlighted commands to the console and you can then press
the 'Enter' key to execute them.

Alternatively, you can open an R file (script) and press 'To Source'
instead of 'To Console'. This copies the highlighted commands to the source
file.
This is a great convenience in creating a source file to be (edited and)
executed as you wish.

HTH,
Eric


On Sat, Jun 22, 2019 at 12:44 AM David Winsemius <dwinsem...@comcast.net>
wrote:

>
> 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 <wdun...@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 <
> >> spbracket...@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@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@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.
>
> ______________________________________________
> R-help@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@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.

Reply via email to