Displaying 20 results from an estimated 6000 matches similar to: "Environment variables under Windows"
1999 Sep 24
2
R's startup : .Rprofile & .Renviron -- info and RFC
[RFC = Request for Comments]
{ Yes, the documentation for .Renviron is really not there (but the FAQ...);
the rest is in ?Startup }
In R's Startup (on Unix only??) {unless --no-environ is specified}
~/.Renviron (if there) is read as an 'sh' script before R is called,
then R looks ((for the site-wide Rprofile and then))
for .Rprofile in the current directory and then for
2006 May 04
3
Rgui, Startup, HOME, R_USER, ...
Hi,
Main objective: Let Rgui find my ~/.Rprofile and ~/.Renviron files,
where ~ is equal to getwd("~").
I have few comments/questions:
(A) On my WinXP Pro installation, the system environment variable
'HOME' is not availble to R, e.g. Sys.getenv("HOME") is empty. I
believe this is default case (correct me if I'm wrong). However, if I
set the "Start
2002 Oct 17
1
Startup on Windows 2000
I am having difficulty coming to grips with Appendix B.2 of the
otherwise very useful "An Introduction to R" and the related help file
for Startup. I am running RGui 1.6.0 on a Windows 2000 machine from the
default installation. How the concepts discussed in B.2 and the Startup
help file relate to what I see on my machine is something of a mystery.
I quote from the Startup file:
2003 Apr 02
19
Combining the components of a character vector
Dear Help,
Suppose I have a character vector.
x <- c("Bob", "loves", "Sally")
I want to combine it into a single string: "Bob loves Sally" .
paste(x) yields:
paste(x)
[1] "Bob" "loves" "Sally"
The following function combines the character vector into a string in the
way that I want, but it seems somewhat inelegant.
2003 Mar 22
1
extracting the names of the dataframe and variables in aov or lm
Dear R Users,
I want to write a function that applies to the dataframe and variables
that were used in a previous call to lm or aov. In order to do this, I
need to write a function that applies to the output of lm or aov, and
yields the names of the dataframe and variables that were used in the lm
or aov analysis.
For example, suppose that I give the command:
aov.out <- aov( Rt ~
2002 Apr 23
3
Subsetting by a logical condition and NA's
I have run into a general problem with subsetting of which the following
is a simple example. Suppose that
x <- c(5, NA, 7, 5, NA, 3)
y <- c(1, 2, 3, 4, 5, 6)
I want to extract the values of y for which x = 5, but y[x==5] yields
> y[x==5]
[1] 1 NA 4 NA
I find that y[!is.na(x) & x==5] yields the desired result:
> y[!is.na(x) & x==5]
[1] 1 4
but I am wondering whether
2002 Dec 20
2
vectorizing test for equality
Dear R Help,
I am trying to create a boolean vector that is TRUE whenever a
particular value occurs in a numeric vector, and FALSE otherwise. For
example, suppose that
> y <- c(5, 2, 4, 3, 1)
> y
[1] 5 2 4 3 1
and suppose that I want to find where 3 occurs in y. Then, the following
yields the solution:
> y == 3
[1] FALSE FALSE FALSE TRUE FALSE
My problem arises when the
2002 Apr 19
4
Multidimensional scaling
A student of mine wants to use R to do some nonmetric multidimensional
scaling. According to the R FAQ, there's a package called pcurve that
computes multidimensional scaling solutions, but I was not able to locate
it the contrib page (I am a Windows user with R version 1.4.1). Can
anyone tell me whether it is possible to do nonmetric multidimensional
scaling with R, and if so, how?
John
2002 Dec 22
4
pasting "\" into character strings
Dear R-Help,
I'm using R version 1.6.0 on a Windows computer. I am trying to create
a function that, among other things, constructs strings that refer to
Windows files, e.g., I might want to construct a string like
'c:\work\part1.txt'. I have found that the following does not work.
> paste("c:", "\", "work", "\", "part1.txt",
2020 Sep 03
2
Rgui never processes ~/.Renviron
ISSUE:
It looks like Rgui.exe never processes ~/.Renviron - only ./.Renviron.
REPRODUCIBLE EXAMPLE:
On Windows, create the following ~/.Renviron and ~/.Rprofile files:
C:\Users\alice> Rscript -e "cat('FOO=123\n', file='~/.Renviron')"
C:\Users\alice> Rscript -e "cat('print(Sys.getenv(\'FOO\'))',
file='~/.Rprofile')"
and launch
2006 Feb 24
2
converting character matrix to a dataframe
Dear R-Help,
Suppose I have a character matrix, e.g.,
(ch.mat <- matrix(c('a','s','*','f','w','*','k','*','*','f','i','o'),
ncol=3))
When I convert 'ch.mat' to a dataframe, the columns are converted to
factors:
(d1 <- data.frame(ch.mat))
mode(d1[,1])
is.factor(d1[,1])
To prevent
2006 Sep 04
1
RGui problem in Windows XP with demo() and help()
I just installed R-2.3.1pat under Windows XP as well as the associated
RWinEdt. If I start RGui from its shortcut (but do _not_ also start
RWinEdt) and then try to execute demo() or help(), I get a RWinEdt
pop-up error window with message:
File "D:\WP\WinEdtData\WinEdt\D:/WP/WinEdtData/WinEdt/R.ini" does not
exist!
Qualifier -e/-E does not specify an existing file!
First
2002 Mar 06
3
Loading tcltk package fails on WinMe/Cygwin but works with Rgui
I am investigating how well R/tcltk is supported on different system and I
ran into the same problem as Christian Schulz reported on February 7, 2002.
I am using [R] v1.4.1 on WinMe and ActiveTcl 8.3.2. Loading tcltk within
Rgui works just fine and both demo(tkdensity) and demo(tkttest) works as
expected. However, when I start R from my Cygwin terminal dyn.load() fails
to load the library:
% R
2001 Oct 31
3
t.test
Dear R-users,
I am learning to use R 1.3.1 on a Pentium running Windows '98. I'm
puzzled that several statistical procedures, t.test and chisq.test, do not
appear to be available on R version 1.3.1. For example, if I type
"t.test", I get the reply, "Object "t.test" not found". Is there a
package that I have to load in order to have access to these
2002 Jul 12
1
.Rprofile on MacOSX
I'm new to R, so apologies if the answer to my question is very obvious to
everyone else!
I use the carbon version of R (1.5.1), not the Darwin version. After a bit
of a battle, I'm getting to grips with using R, and really getting to like
it, but I'm still having trouble customising startup the way I'd like it.
Reading ?Startup, I see that I can specify some commands to be run
2002 Mar 06
2
Installing a Package in Windows 2000
I'm using R 1.4.1 under Windows 2000 and am experiencing difficulty
installing a package. I've included an example output using Rcmd build,
but the same problem occurs with Rcmd check and Rcmd INSTALL. The error
(make[1]: /bin/sh.exe: Command not found) is not a new one - it's
referenced in readme.packages among other locations. I've placed a copy
of sh.exe in C:\bin, but it
2002 Mar 25
1
Problems installing Tcl/Tk
Hi!
Two questions:
1.-I am trying to put Tcl/tk to work. I keep getting the following:
>Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library
"C:/RW1041/library/tcltk/libs/tcltk.dll":
>LoadLibrary failure: No se puede hallar uno de los archivos de biblioteca
necesarios para ejecutar esta aplicación.
>Error in library(tcltk) :
2002 Jan 30
5
1.4.1 R CMD check broken?
I am not sure if this is already known. I checked BUGS and found some
references to similar behavior when R_HOME is set?
Here is what I get:
(1) Fresh build of 1.4.1 under Linux/RH-7.2. All tests pass.
> R CMD check ctest
* checking for working latex ... OK
* using log directory `/home/andyj/stat/R-1.4.1/library/ctest.Rcheck'
Installing *source* package `ctest'
2008 Sep 07
2
R_USER - in which file should I include it?
Hello
I am a newbie. I had my R upgraded from 2.7.1 to 2.7.2 and in doing so I
decided to install all 2.7 versions under c:\program files\R\2.7 from now on
(2.7.1 is located under .\2.7.1)
Although I don't like the idea (I am running Vista), I have edited
etc\Renviron.site to contain:
R_USER=c:/Users/eduardo/Documents/R
R_LIBS_USER=c:/Users/eduardo/Documents/R/win-library/2.7
As far as
2009 Jul 21
1
Customization options with .Renviron, R_LIBS, .Rprofile etc
Hi,
I am interested in customizing the installation of R. I have
gone through the ?R Installation and Administration? manual. But some
of the stuff is not clear to me and I would like to get clarifications
on the following points (for a Windows installation with
R_HOME=C:\\R\\R-2.9.1 ) :
1. I understand that I need to create a
file, .Renviron with the following path : R_HOME\\etc\\.Renviron where