Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Martin Morgan

On 09/16/2017 11:29 AM, Rene J Suarez-Soto wrote:

I have not intentionally set R_LIBS_USER. I looked for an Renviron.site
file but did not see it in R/etc or my home directory. The strange part is
that if I print Sud.getenv I see a value for R_LIBS_USER. However, this
directory is not showing under libPaths.

I though .libPaths should contain R_LIBS_USER.


If the directory pointed to by R_LIBS_USER does not exist, then 
.libPaths() will not contain it. This is documented on ?.libPaths or 
?R_LIBS_USER


 Only directories
 which exist at the time will be included.

The file in the user home directory is .Renviron, rather than 
Renviron.site. This documented at, e.g,. ?Renviron


 The name of the user file
 can be specified by the 'R_ENVIRON_USER' environment variable; if
 this is unset, the files searched for are '.Renviron' in the
 current or in the user's home directory (in that order).

R environment variables are set when R starts; I can discover these, on 
linux, by invoking the relevant command-line command after running R CMD


$ env|grep "^R_"
$

(i.e., no output) versus

$ R CMD env|grep "^R_"
R_UNZIPCMD=/usr/bin/unzip
...

Generally, ?Startup describes the startup process, and most variables 
are described in R via ?R_...


Martin



I also noticed that R related variables are not in the system or user
variables because I dont see them when I type SET from the Windows Command
line. So a related question is where does R get the system variables
(e.g., R_LIBS_USER,
R_HOME) if I dont see a Renviron.site file. Thanks

On Sep 16, 2017 10:45 AM, "Henrik Bengtsson" 
wrote:

I'm not sure I follow what.the problem is. Are you trying to
set R_LIBS_USER but R does not acknowledge it, or do you observe something
in R that you didn't expect to be there and you are trying to figure out
why that is / where that happens?

Henrik

On Sep 16, 2017 07:10, "Rene J Suarez-Soto"  wrote:


I have a computer where R_LIBS_USER is not found in libPaths. This is for
Windows (x64). I ran R from the command line, RGui and RStudio and I get
the same results. I also ran R --vanilla and I still get the discrepancy.

The only thing I found interesting was that I also ran SET from the command
line and the "R related variables" (e.g.,  R_HOME; R_LIBS_USER) are not
there. Therefore these variables are being set when I start R. I have not
been able to track where does R obtain the value for these.

Aside from looking at
http://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html I am
not sure I have much more information that I have found useful.

Thanks

R

 [[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/posti
ng-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.




This email message may contain legally privileged and/or...{{dropped:2}}

__
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.


Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Jeff Newmiller
These environment variables are _inputs_ to the R startup sequence, and 
optional ones at that. If you don't set them then R makes default settings. 
Read the R Installation and Administration manual that comes with R for more 
information. 

You also need to understand the scope of environment variables, which is a 
topic specific to each operating system and is not specific to R. In a 
nutshell, a process (running program) that sets an environment variable can 
pass that setting to processes it starts, but the reverse is not true. If you 
want to set such variables for widespread use you can use the System control 
panel and logout and login so all processes will inherit them. 

Note that if you want to modify .libpaths in R you can do so without modifying 
environment variables. 
-- 
Sent from my phone. Please excuse my brevity.

On September 16, 2017 6:16:05 AM PDT, Rene J Suarez-Soto 
 wrote:
>I have a computer where R_LIBS_USER is not found in libPaths. This is
>for
>Windows (x64). I ran R from the command line, RGui and RStudio and I
>get
>the same results. I also ran R --vanilla and I still get the
>discrepancy.
>
>The only thing I found interesting was that I also ran SET from the
>command
>line and the "R related variables" (e.g.,  R_HOME; R_LIBS_USER) are not
>there. Therefore these variables are being set when I start R. I have
>not
>been able to track where does R obtain the value for these.
>
>Aside from looking at
>http://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html I
>am
>not sure I have much more information that I have found useful.
>
>Thanks
>
>R
>
>   [[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.


Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Michael Dewey

Dear Rene

I am not sure I understand your problem so this may be completely uselss 
but when I am going to run R from the command line I first of all run a 
little batch file.


set R_HOME=C:\Users\Michael\Documents\bin\R\R-3.4.1
set R_PATH=%R_HOME%\bin\x64
set PATH=%R_PATH%;%PATH%

Someone (forgotten who, sorry) posted this years ago on this site.

Michael

On 16/09/2017 14:16, Rene J Suarez-Soto wrote:

I have a computer where R_LIBS_USER is not found in libPaths. This is for
Windows (x64). I ran R from the command line, RGui and RStudio and I get
the same results. I also ran R --vanilla and I still get the discrepancy.

The only thing I found interesting was that I also ran SET from the command
line and the "R related variables" (e.g.,  R_HOME; R_LIBS_USER) are not
there. Therefore these variables are being set when I start R. I have not
been able to track where does R obtain the value for these.

Aside from looking at
http://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html I am
not sure I have much more information that I have found useful.

Thanks

R

[[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.

---
This email has been checked for viruses by AVG.
http://www.avg.com




--
Michael
http://www.dewey.myzen.co.uk/home.html

__
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.


Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Rene J Suarez-Soto
I have not intentionally set R_LIBS_USER. I looked for an Renviron.site
file but did not see it in R/etc or my home directory. The strange part is
that if I print Sud.getenv I see a value for R_LIBS_USER. However, this
directory is not showing under libPaths.

I though .libPaths should contain R_LIBS_USER.

I also noticed that R related variables are not in the system or user
variables because I dont see them when I type SET from the Windows Command
line. So a related question is where does R get the system variables
(e.g., R_LIBS_USER,
R_HOME) if I dont see a Renviron.site file. Thanks

On Sep 16, 2017 10:45 AM, "Henrik Bengtsson" 
wrote:

I'm not sure I follow what.the problem is. Are you trying to
set R_LIBS_USER but R does not acknowledge it, or do you observe something
in R that you didn't expect to be there and you are trying to figure out
why that is / where that happens?

Henrik

On Sep 16, 2017 07:10, "Rene J Suarez-Soto"  wrote:

> I have a computer where R_LIBS_USER is not found in libPaths. This is for
> Windows (x64). I ran R from the command line, RGui and RStudio and I get
> the same results. I also ran R --vanilla and I still get the discrepancy.
>
> The only thing I found interesting was that I also ran SET from the command
> line and the "R related variables" (e.g.,  R_HOME; R_LIBS_USER) are not
> there. Therefore these variables are being set when I start R. I have not
> been able to track where does R obtain the value for these.
>
> Aside from looking at
> http://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html I am
> not sure I have much more information that I have found useful.
>
> Thanks
>
> R
>
> [[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/posti
> ng-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.


Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Henrik Bengtsson
I'm not sure I follow what.the problem is. Are you trying to
set R_LIBS_USER but R does not acknowledge it, or do you observe something
in R that you didn't expect to be there and you are trying to figure out
why that is / where that happens?

Henrik

On Sep 16, 2017 07:10, "Rene J Suarez-Soto"  wrote:

> I have a computer where R_LIBS_USER is not found in libPaths. This is for
> Windows (x64). I ran R from the command line, RGui and RStudio and I get
> the same results. I also ran R --vanilla and I still get the discrepancy.
>
> The only thing I found interesting was that I also ran SET from the command
> line and the "R related variables" (e.g.,  R_HOME; R_LIBS_USER) are not
> there. Therefore these variables are being set when I start R. I have not
> been able to track where does R obtain the value for these.
>
> Aside from looking at
> http://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html I am
> not sure I have much more information that I have found useful.
>
> Thanks
>
> R
>
> [[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.