[R] problem using embedded R

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat May 24 14:15:19 CEST 2008


We don't support Windows 2000, so you will have to produce your own 
workaround.  But the relevant code is

         PATH <- Sys.getenv("PATH")
         Sys.setenv(PATH = paste(gsub("/", "\\\\", DLLpath), PATH, sep=";"))
         on.exit(Sys.setenv(PATH = PATH))

so I think the issue is that you did *not* set PATH correctly. (On Windows 
there are multiple environments, and you need to set the ISO C one and not 
the Windows version.)

When you are using an unsupported OS version, it really is basic courtesy 
to follow the posting guide and tell us up front.

On Fri, 23 May 2008, Lobanov, Victor S. [PRDUS] wrote:

> It is Windows 2000 still... I use latest version of R 2.7.0. There is a
> system environment variable "PATH" that lists directories where system
> looks for dlls when needed. Each running process can modify this
> environment variable, but changes apply to this process only. Instead of
> modifying system settings, my application simply sets correct R_HOME and
> PATH (e.g. c:\MyApp\R\bin) when it starts so that R can load supporting
> dlls such as lapack.dll. However, after I load a package and check
> process PATH, it is reset to the original system setting and all my
> modifications are lost.
>
> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
> Sent: Friday, May 23, 2008 12:46 PM
> To: Lobanov, Victor S. [PRDUS]
> Cc: r-help at r-project.org
> Subject: Re: [R] problem using embedded R
>
>
> All the usual questions:
>
> What OS?
> What version of R?
> What is meant by 'environment path'?  (The environment of a process is
> not
> a path.)
>
> I have a hunch that if this is Windows >= XP it was solved in R 2.7.0.
> Otherwise the footer of this message applies.
>
> On Fri, 23 May 2008, Lobanov, Victor S. [PRDUS] wrote:
>
>> I have a peculiar problem with an application that uses embedded R.
>> The application comes with its own copy of R installation and it sets
>> up correct environment path for the process during the startup.
>> However, when I execute R code that loads an additional package (e.g.
>> library(XYZ)), the environment path gets reset to the system's default
>
>> value, which renders R unusable. I wonder if anyone had experienced a
>> similar problem and knows how to fix it?
>>
>> Victor
>>
>>
>> 	[[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.
>>
>
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> 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
>
> ______________________________________________
> 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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



More information about the R-help mailing list