|
Upgraded to 2.15.1 from 2.15.0 this morning, on Windows 7.
I'm setting R_HOME in Control Panel, and before the upgrade, 2.15.0 recognized the value with no problems and would use it to find rprofile.site, etc. Now, after upgrade, neither .0 nor .1 recognize it at all. From the cmd line, Windows indicates it is definitely set to the value I've specified. Anyway, as a result, R is not reading in renviron.site and not running rprofile.site. I don't know where to start troubleshooting this. I've restarted the machine...because it's Windows...to no effect. |
|
Can we have a Window subset of fortunes?
John Kane Kingston ON Canada > -----Original Message----- > From: [hidden email] > Sent: Mon, 23 Jul 2012 14:06:48 -0700 (PDT) > To: [hidden email] > Subject: [R] R doesn't recognize R_HOME value > I don't know where to start troubleshooting this. I've restarted the > machine...because it's Windows...to no effect. ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! ______________________________________________ [hidden email] 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. |
|
???
Windows 7 is where I'm seeing the problem. The root problem: while I have R_HOME legitimately specified within Windows 7, and issuing 'set R_HOME' from the command line returns exactly the path I've specified, doing a Sys.getenv('R_HOME') from R returns a completely different path. I ask, "What would cause a Sys.getenv() call to return a different value than the OS does?" |
|
You are asking us how your operating system works, but this list is about R.
The key thing you appear to not understand is that environment variables are local to each process, and default environment variables are received from the process that started any given process. I ask you to go study this in a more appropriate place, and for our sanity in the meantime suggest that you set the environment variables in the Advanced area of the System control panel, and then log out and log in to make sure all your processes receive them. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<[hidden email]> 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. Kirk Fleming <[hidden email]> wrote: >??? > >Windows 7 is where I'm seeing the problem. > >The root problem: while I have R_HOME legitimately specified within >Windows >7, and issuing 'set R_HOME' from the command line returns exactly the >path >I've specified, doing a Sys.getenv('R_HOME') from R returns a >completely >different path. > >I ask, "What would cause a Sys.getenv() call to return a different >value >than the OS does?" > > > >-- >View this message in context: >http://r.789695.n4.nabble.com/R-doesn-t-recognize-R-HOME-value-tp4637510p4637672.html >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >[hidden email] 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. ______________________________________________ [hidden email] 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. |
|
In reply to this post by Kirk Fleming
On 24/07/2012 21:57, Kirk Fleming wrote:
> ??? > > Windows 7 is where I'm seeing the problem. > > The root problem: while I have R_HOME legitimately specified within Windows > 7, and issuing 'set R_HOME' from the command line returns exactly the path > I've specified, doing a Sys.getenv('R_HOME') from R returns a completely > different path. > > I ask, "What would cause a Sys.getenv() call to return a different value > than the OS does?" A different process and hence a different environment ... this is why they are called 'environment variables' and are specific to a process. 'The command line' is actually a shell process, not the OS itself. Setting environment variables in a shell affects only that shell and those which inherit from it. See ?R_HOME in R, which tells you that is the R process 'is normally set on startup'. 'Normally' because there are many ways to start R (embedded, for example: see 'Writing R Extensions'), and you have not actually told us how you started R. But Rgui.exe and Rterm.exe do always set R_HOME. -- Brian D. Ripley, [hidden email] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [hidden email] 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. |
|
On Jul 25, 2012, at 07:58 , Prof Brian Ripley wrote: > On 24/07/2012 21:57, Kirk Fleming wrote: >> ??? >> >> Windows 7 is where I'm seeing the problem. >> >> The root problem: while I have R_HOME legitimately specified within Windows >> 7, and issuing 'set R_HOME' from the command line returns exactly the path >> I've specified, doing a Sys.getenv('R_HOME') from R returns a completely >> different path. >> >> I ask, "What would cause a Sys.getenv() call to return a different value >> than the OS does?" > > A different process and hence a different environment ... this is why they are called 'environment variables' and are specific to a process. > > 'The command line' is actually a shell process, not the OS itself. Setting environment variables in a shell affects only that shell and those which inherit from it. > > See ?R_HOME in R, which tells you that is the R process 'is normally set on startup'. 'Normally' because there are many ways to start R (embedded, for example: see 'Writing R Extensions'), and you have not actually told us how you started R. But Rgui.exe and Rterm.exe do always set R_HOME. Notice also that R_HOME represents R's own knowledge of its installation directory, where it looks for various support files, the default package library, etc. R sets R_HOME for itself; even if you could, you really do not want to override it. Try looking at ?Startup for the correct ways to specify alternative locations of profile files, etc. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: [hidden email] Priv: [hidden email] ______________________________________________ [hidden email] 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. |
|
On 25/07/2012 09:14, peter dalgaard wrote:
> > On Jul 25, 2012, at 07:58 , Prof Brian Ripley wrote: > >> On 24/07/2012 21:57, Kirk Fleming wrote: >>> ??? >>> >>> Windows 7 is where I'm seeing the problem. >>> >>> The root problem: while I have R_HOME legitimately specified within Windows >>> 7, and issuing 'set R_HOME' from the command line returns exactly the path >>> I've specified, doing a Sys.getenv('R_HOME') from R returns a completely >>> different path. >>> >>> I ask, "What would cause a Sys.getenv() call to return a different value >>> than the OS does?" >> >> A different process and hence a different environment ... this is why they are called 'environment variables' and are specific to a process. >> >> 'The command line' is actually a shell process, not the OS itself. Setting environment variables in a shell affects only that shell and those which inherit from it. >> >> See ?R_HOME in R, which tells you that in the R process 'is normally set on startup'. 'Normally' because there are many ways to start R (embedded, for example: see 'Writing R Extensions'), and you have not actually told us how you started R. But Rgui.exe and Rterm.exe do always set R_HOME. > > > Notice also that R_HOME represents R's own knowledge of its installation directory, where it looks for various support files, the default package library, etc. > > R sets R_HOME for itself; even if you could, you really do not want > to override it. Try looking at ?Startup for the correct ways to specify Well, I was being careful, and the following may be too technical for R-help. R's own front-ends set R_HOME for themselves, but embedded versions of R may well get it from somewhere else and for such uses the end-user may need to specify it as an environment variable in the process embedding R. Alternative front-ends (e.g. RStudio) are examples of embedding and do need a way to find R's own installation directory (which may or may not be recorded in the Windows Registry on Windows). Rgui.exe uses its own path to find R_HOME. -- Brian D. Ripley, [hidden email] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [hidden email] 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. |
|
From the beginning I'd set R_HOME from within the Advanced area of Control Panel, and never actually set it from within a shell. I'll take the advice given, however, and not set it to any value at all. I did feel this was an R question since things were working as expected until upgrading, then not working as expected afterward. With my new enhanced understanding I'll start from scratch and get it resolved.
|
|
I wanted to wrap this up, since I feel it's been resolved.
R_HOME never did need to over-ridden by me, was not being over-ridden in spite of my attempts, and was never a factor during the long period when 'everything worked'. In fact, my entire ordeal was caused by removing a comment from the rprofile.site file and in so doing, accidentally removing a closing brace from a function definition. In using a quick-and-dirty editor, this error wasn't highlighted. Having no output from rprofile whatsoever and no errors, I concluded it was not being run, and not being found. |
| Powered by Nabble | Edit this page |
