Displaying 20 results from an estimated 30000 matches similar to: "setting environmental variable inside R function to call C function"
2013 May 23
0
[LLVMdev] Usage of getenv() inside LLVM and thread safety
Right. glibc's amusing stance is that you setenv/putenv are not thread
safe, but getenv is. I assume Ruby exposes setenv and therefore simply not
calling setenv isn't an option.
Would it solve your problems if all getenv() calls happened at
cl::ParseCommandLineOptions() time?
On Thu, May 23, 2013 at 9:49 AM, Dirkjan Bussink <d.bussink at gmail.com>wrote:
> Hello,
>
>
2001 Jun 04
0
Problems with environmental variables set with Sys.putenv
Hi,
I see some weird behavior when loading a specific dataframe after changing the value of
an enviroment variable using Sys.putenv(). Alas, I can't reproduce it from an
arbitrary dataframe. Here is the session:
R : Copyright 2001, The R Development Core Team
Version 1.2.3 (2001-04-26)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under
2009 Feb 02
3
Environmental variables
I use a Mac (10.4.11 Mac Os X).
In my .tcshrc I define an environmental variable MY.
Is it possible to find out its value from inside R? When one loads
R for Mac OS X Cocoa GUI written by:
Simon Urbanek
Stefano M. Iacus
are files like .tcshrc read by R?
Can I make the value of this environmental variable available to R?
Sys.getenv() produces a lot of output, with the values of many
2011 Jun 29
1
Update MS Windows PATH variable based on a R script
Dear list,
this is not directly an R question, but it is somewhat related to R
aspects, so I hope it's okay to post it here:
I'd like to update my windows PATH based on a script routine in order to
make sure that crucial components are contained. Much like what happens
at the installation of Rtools (if desired). Now, can you do that from
within R or do I need some sort of windows
2015 May 11
0
Windows environmental variables
Hi,
I recently had some difficulty getting an embedded R session running
on Windows, due to the way that R Sys.getenv works, which I would
consider a bug. Even if you do not agree, then you may still want to
document it for future users who might be bitten.
As outlined in R-exts (?8.2.2):
http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Calling-R_002edll-directly
R_HOME/bin needs to
2017 Aug 25
0
getOption() versus Sys.getenv
On 25/08/2017 1:19 PM, Sam Albers wrote:
> Hi there,
>
> I am trying to distinguish between getOption() and Sys.getenv(). My
> understanding is that these are both used to set values for variables.
> getOption is set something like this: option("var" = "A"). This can be
> placed in an .Rprofile or at the top of script. They are called like this
>
2013 Jan 29
0
Setting -sys.setenv()- permanently in Linux using RStudio
> sessionInfo()R version 2.15.2 (2012-10-26)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
LC_TIME=en_GB.UTF-8
[4] LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8
LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=C LC_NAME=C
LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=C
attached base packages:
2001 Nov 30
0
Problems with environmental variables set with Sys.putenv
Environment variables set with Sys.putenv() "disappear" spontaneously (and
somewhat randomly) when I load large datasets.
This was reported in R-help by Dave Kane on June 4, 2001; I have not seen any
further discussion. I'm not sure if I can report it as a "bug", since it is
not entirely reproducible. Could someone try this and see if you have trouble
too? The following
2014 Apr 25
0
Preventing $R_HOME/site-library/ via R_LIBS_SITE=":" (no other way?)
(As a non-root/non-admin), I've just tried to figure out how to
prevent a default $R_HOME/site-library/ to be added to the library
path. The solution I found was to environment variable R_LIBS_SITE to
":" (preferably in ~/.Renviron). Note that setting R_LIBS_SITE to en
empty string will cause it to fall back to using
$R_HOME/site-library/. This "hack" is based on the
2013 May 23
4
[LLVMdev] Usage of getenv() inside LLVM and thread safety
Hello,
In Rubinius we're seeing an occasional crash inside LLVM that always happens inside getenv(), which is used for example when creating a MCContext (inside lib/MC/MCContext.cpp, it checks getenv("AS_SECURE_LOG_FILE")).
The problem is that getenv() and friends aren't thread safe and Rubinius provides a multithreaded system. We can relatively easily get locking setup around
2020 Aug 28
0
Evaluate values in `Sys.setenv`
It is the shell that does the ~ and $ expansions, and Sys.setenv() doesn't go via the shell, so you cannot expect it to understand the shell metacharacters. Instead, you need to do the corresponding computations in R, e.g.
> paste(path.expand("~/mypath"), Sys.getenv("PATH"), sep=":")
[1]
2020 Jun 02
0
[PATCH nbdkit 2/5] vddk: Move reexec code to a new file.
Pure refactoring. Just decouples the complicated reexec code from the
rest.
---
plugins/vddk/Makefile.am | 2 +
plugins/vddk/vddk.h | 42 +++++++++
plugins/vddk/reexec.c | 196 +++++++++++++++++++++++++++++++++++++++
plugins/vddk/vddk.c | 151 ++----------------------------
4 files changed, 246 insertions(+), 145 deletions(-)
diff --git a/plugins/vddk/Makefile.am
2012 Feb 21
1
tempdir() documentation or real bug ?
?tempdir says
By default, ?tmpdir? will be the directory given by ?tempdir()?.
This will be a subdirectory of the temporary directory found by
the following rule. The environment variables ?TMPDIR?, ?TMP? and
?TEMP? are checked in turn and the first found which points to a
writable directory is used: if none succeeds ?/tmp? is used.
Unfortunately, it doesn't seem to
2020 Aug 20
0
[PATCH nbdkit 12/13] wrapper: Port the wrapper to run on Windows.
This also defines SOEXT as the extension of shared objects (ie. "so"
or "dll"), and uses it everywhere. I assumed this must already be
defined by either autoconf or mingw (like OBJEXT) but I cannot find
anything except in glib (G_MODULE_SUFFIX).
Thanks: Zebediah Figura for helping out with exec vs spawn on Windows.
---
configure.ac | 8 +++-
2020 Aug 28
2
Evaluate values in `Sys.setenv`
Hi all,
I would like to know if there is any way to evaluate the values in
`Sys.setenv` before setting the environment variables. For example, if we
want to add a path to the environment variable `PATH`, we can do this in a
terminal
```
> export PATH=~/mypath:$PATH
> echo $PATH
/Users/jeff/mypath:...
```
However, this style of assignment is not allowed in `Sys.setenv`, it
treats its
2002 Apr 08
1
Problem(?) in strptime() -- short version
I decided my earlier email on this topic was rather long and wordy;
here's a condensed version.
I am sitting at a Solaris computer in the US/Pacific timezone.
I have a file of data having times that includes the following three values
2002-4-7 1:30:00 GMT
2002-4-7 2:30:00 GMT
2002-4-7 3:30:00 GMT
I have not been able to find a way to correctly convert these to
either of the POSIX
2012 Mar 08
2
Cannot change location of tempdir()
Hi,
One of the functions I use needs to write to a temporary file, in the
directory given by tempdir(). I want to change this from the standard
one, as the file is too large for the drive. However, tempfile() doesnt
seem to respect the environment variables when I change them with
Sys.setenv(). In a fresh R-session:
> Sys.getenv("TMP")
[1]
2010 Sep 07
2
Environmental Variables
Hi Everybody, I been looking through google for better part of the day but I
haven''t been able to find an answer to my problem.
I need an environmental variable to be present in puppet, so that yum works
correctly. However after reboot puppet doesn''t read /etc/profile and starts
without this profile.
If I go into server and do services puppet restart than everything works
fine,
2001 Jul 12
1
Sys.getenv
I am running R-1.3.0 on Solaris 8:
Under Solaris I do
setenv dendro_us hoffmann
echo $dendro_us gives back:
hoffmann
which is correct.
When in R I do:
Sys.getenv("dendro_us") I get
dendro_us
""
which is NOT correct:
Inverse effect (taken from help of Sys.getenv)
Under R:
print(Sys.putenv("R_TEST"="testit", ABC=123))
[1] TRUE TRUE
2012 May 22
1
Is there an inverse function of Sys.getenv()
Using "Sys.getenv()",
I got a list of 380 environment variables...
Now I open a new R session,
how do I set those environment variables in my new R session using
"Sys.setenv()"?
There is no batch function for "Sys.setenv()"?
Is there an import/export environment variables function?
Basically I want to export all the environment variables from one R
session and