[R] two questions - function help and 32vs64 bit sessions

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Mon Jul 14 19:33:17 CEST 2014


I don't know any definitive answer for either if your questions, but I have a comment that may explain why I have not encountered these issues.

At one time I used to use RData files the way you are, but I discovered the value of re-running my analysis scripts from scratch regularly... as in dozens of times per day. Whenever the run time gets too long to be compatible with that, I modify the script to conditionally either regenerate any mostly-verified intermediate data objects that are slow to generate and save them with saveRDS, or simply reload them using loadRDS. Then I run most of the time with a trigger variable set to simply reload the debugged data objects for subsequent analysis or output formatting. The goal here is to build reproducible analysis scripts, not mysterious RData files generated by an unknown sequence of commands.

With this approach in mind, R sessions need not stay open long, and the script can have a check (using perhaps .Machine$sizeof.pointer) at the beginning that verifies your architecture before proceeding. You might also be able to put a shortcut or batch file in your working directory for projects that require specific versions/architectures of R that point to the correct one for that project. Then you just start R using that shortcut or script.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On July 14, 2014 9:42:54 AM PDT, "Fowler, Mark" <Mark.Fowler at dfo-mpo.gc.ca> wrote:
>Hello,
>
> 
>
>Two unrelated questions, and neither urgent.
>
> 
>
>Windows 7, R 3.0.1. Using R Console, no fancy interface.
>
> 
>
>The function help ultimately becomes lost to a session kept running for
>extended periods (days). I.e. with a new session if you invoke the Help
>menu 'R functions (txt)...' it activates the html help and goes to the
>named function page. This will work fine for at least a day, but
>typically the next day invoking the help menu in this fashion will
>fail,
>as R looks for a temporary address it creates on your computer. This
>gets lost, possibly due to network administration activity. So then I
>save and start another session with same Rdata. Trivial enough but
>irritating. Anybody know how to restore the 'link' without ending and
>restarting the session?
>
> 
>
>I have a mix of 32-bit and 64-bit requirements, with 64 the default. I
>became used to starting R sessions directly from the appropriate Rdata
>workspaces. With the latest version I need to start from the generic
>icon and then load the workspace if I want 32-bit. Anybody know a way
>to
>make the Rdata files keep track of which bit version they work with, or
>some trick that accomplishes the same objective? The 32-bit requirement
>is usually just RODBC, and the need for it is scattered over lots of
>workspaces. Again, trivial but a nuisance. A more pragmatic motive is
>to
>not oblige users of applications to think about it. Any way to make a
>session switch 'bits' with a source file?
>
> 
>
>Mark Fowler 
>Population Ecology Division 
>Bedford Inst of Oceanography 
>Dept Fisheries & Oceans 
>Dartmouth NS Canada 
>B2Y 4A2 
>Tel. (902) 426-3529 
>Fax (902) 426-9710 
>Email Mark.Fowler at dfo-mpo.gc.ca <mailto:Mark.Fowler at dfo-mpo.gc.ca>  
>
>
>
> 
>
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>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