Displaying 20 results from an estimated 2000 matches similar to: "Passing command line parameters to a script"
2004 Dec 03
1
Getting R to emit an image file as a pipe or Base64 stream: Mac OSX 10.3 - R 2.0.1
Hi All,
Anybody know how to make R emit base64 encoded text in some way that perl
can grab it, instead of planting a file on your harddrive when calling
JPEG or PNG?
I've managed to get these scripts to work and put a file on the harddisk
#!/usr/bin/perl -Wall
# by jin kee. a simple script to demonstrate
# the needed steps to get R to emit a jpeg.
use strict;
my($callR, $callRold);
# need
2019 Apr 30
2
Background R session on Unix and SIGINT
Yeah, I get that they are async.
What happens is that the background process is not doing anything when
the process gets a SIGINT. I.e. the background process is just
listening on its standard input.
AFAICT for an interactive process such a SIGINT is just swallowed,
with a newline outputted to the terminal.
But apparently, for this background process, it is not swallowed, and
it is triggered
2019 Apr 30
2
Background R session on Unix and SIGINT
OK, I managed to create an example without callr, but it is still
somewhat cumbersome. Anyway, here it is.
Terminal 1:
mkfifo fif
R --no-readline --slave --no-save --no-restore < fif
Terminal 2:
cat > fif
Sys.getpid()
This will make Terminal 1 print the pid of the R process, so we can
send a SIGINT:
Terminal 3:
kill -INT pid
The R process is of course still running happily.
Terminal 2
2004 Dec 03
1
Getting R to emit an image file as a pipe or Base64 strea m: Mac OSX 10.3 - R 2.0.1
> From: Yuandan Zhang
>
> If you want to call R from perl, why don't you do a simple
> system call like:
>
> $callR="/usr/loca/bin/R CMD BATCH plotscript.R";
> system ($callR);
>
> It is not necessary to start X display if anything can be
> done in background
But the problem is jpeg()/png() are not available unless an X display is
available to the
2017 Sep 06
3
withr::set_makevars
Hi All;
This problem has come about from trying to learn some of the review practices recommend by rOpensci. One of them is to use the package goodpractice. After installing goodpractice, it kept failing on my own packages which are under development, and I was concerned something was funny in my own , so I have a fork of the package rerddap, and I tested goodpractice on that. I get the
2017 Sep 07
0
withr::set_makevars
withr:::set_makevars() can give that error if the makefile named by the
'old_path' argument (default "~/.R/Makevars) contains more than one
definition of a variable of the form 'name=value'. You can see what file
it is reading and its contents by using the trace() function:
trace(withr:::set_makevars, quote({ cat(old_path, "\n");
writeLines(paste0(" ",
2019 Apr 30
2
[External] Re: Background R session on Unix and SIGINT
Unfortunately --interactive also makes the session interactive(),
which is bad for me, as it is a background session.
In general, I don't want the interactive behavior, but was wondering
if I could send as SIGINT to try to interrupt the computation of the
background process, and if that does not work, then I would send a
SIGKILL and start up another process. It all works nicely, except for
2016 Nov 18
3
Linking LLVM IR with standard library
Hi,
I have a LLVM IR file generated for a different source language (Not C). I
have added a rand() function in it to generate random numbers.
I compiled the .ll file to .o using clang. However, when I execute the .o
file all generated numbers are zeros.
How should I link the .ll file with the standard library for the clang to
generate the random numbers?
Thanks
-Shilpa
-------------- next
2019 Apr 30
2
Background R session on Unix and SIGINT
Hi All,
I realize that this is not a really nice reprex, but anyone has an
idea why a background R session would "remember" an interrupt (SIGINT)
on Unix?
rs <- callr::r_session$new()
rs$interrupt() # just sends a SIGINT
#> [1] TRUE
rs$run(function() 1+1)
#> Error: interrupt
rs$run(function() 1+1)
#> [1] 2
It seems that the main loop somehow stores the SIGINT it
2001 Oct 21
1
Wine and Dual booted Windows
Hi,
I have not yet found anything about this is the documentation. I have W95
and W2K installed and I would like to use both, if possible.
So is there anyway to config wine so that i can specify it run w95 or
w2k ? Some of my programs do not run and i think it maybe because they
were installed for w95.
thanks
--
Never in the world does hatred cease by hatred; hatred ceases by love.
--
2007 Jan 25
1
'Fitting' a model at predefined points
Hi,
I have a linear model ("mod1 <- lm(V3~V1+V2) and I would like to get the
model's prediction at values of V1 and V2 not included in the original
sample.
samp <- read.table("data.dat",nrows=100)
attach(samp)
out.poly <- lm(V3 ~ V1 + V2)
If I try to use out.poly to predict values for the function I run into
problems. It seems that it isn't possible to use a new
2009 Mar 23
1
Copying a subset of a matrix
Hi,
I have a matrix and I want to create a matrix that includes every nth column
of the original matrix. Does anyone know how I can go about doing that ? Or
if you have an idea how I can do the same thing with a data frame ? If you
can just point me towards the appropriate function I would appreciate it.
Thanks
[[alternative HTML version deleted]]
2015 Apr 16
2
[LLVMdev] Multiple connected components in live interval
Hi,
I have come across a csmith generated test case that made the
MachineVerifier spit out:
*** Bad machine code: Multiple connected components in live interval ***
Having looked at what this might mean, it seems that
ConnectedVNInfoEqClasses::Classify() was called on the LI in question by
the verifier, and that it returned two equivalence classes, instead of
just one, which is demanded by
2018 May 06
1
Ubuntu 18.04 bionic: availability of R Ubuntu packages/ppa?
awesome, merci Dirk!
and my apologies for not scrolling down better, I failed to see that the
18.04 update was linked to the R 3.5 issue .
Further, please forgive my impatience, but I was very curious to see if the
package tidyverse could be installed: I have the impression that it is
short of being installed, missing just a few simple packages (with no
apparent non-R dependencies). Indeed, a
2015 Apr 16
2
[LLVMdev] Multiple connected components in live interval
Hi Jonas,
Could you file a PR with your test case please?
Thanks,
-Quentin
> On Apr 16, 2015, at 3:50 PM, Andrew Trick <atrick at apple.com> wrote:
>
>>
>> On Apr 16, 2015, at 6:58 AM, Jonas Paulsson <jonas.paulsson at ericsson.com <mailto:jonas.paulsson at ericsson.com>> wrote:
>>
>> Hi,
>>
>> I have come across a csmith generated
2015 Apr 17
2
[LLVMdev] Multiple connected components in live interval
Hi Jonas,
When is the MachineVerifier complaining?
I mean after which pass?
Thanks,
-Quentin
> On Apr 17, 2015, at 7:17 AM, Jonas Paulsson <jonas.paulsson at ericsson.com> wrote:
>
> Hi,
>
> thanks for answering, but the COPY is there already from after isel. It is a copy of a subreg, after a a call returning 64 bits.
>
> call
2018 May 05
2
Ubuntu 18.04 bionic: availability of R Ubuntu packages/ppa?
Hi
I just upgraded to the Ubuntu 18.04 LTS, and tried to add both the "Ubuntu
packages" source as well as ppa. I was not able to do this, trying to add
for example:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu bionic/
or using: sudo add-apt-repository ppa:marutter/c2d4u
am I doing something wrong, or just being impatient? Are there any plans to
build these repos in the near
2015 Apr 20
2
[LLVMdev] Multiple connected components in live interval
Hi Jonas,
> On Apr 20, 2015, at 4:03 AM, Jonas Paulsson <jonas.paulsson at ericsson.com> wrote:
>
> Hi Quentin,
>
> After Simple Register Coalescing.
Is the code you have pasted with the PHIs feed to the register coalescer?
I am trying to understand the setting to help debugging the problem.
Also, what does -debug-only=regalloc tell you?
Thanks,
-Quentin
>
>
2013 Jan 04
1
Integrating Java, C++ and R
Hi,
I am able to integrate C++ and R through RInside library. However when I
use a jni call as my UI is through java it crashes at C++ side. My files
are
------------------------------------------------
JNICallingClass.C:
JNIEXPORT void JNICALL Java_CallR_run (JNIEnv* env, jobject callr){
std::cout << "Inside JNICALL" << std::endl;
testR();
2019 Apr 30
0
[External] Re: Background R session on Unix and SIGINT
A Simon pointed out the interrupt is recorded but not processed until
a safe point.
When reading from a fifo or pipe R runs non-interactive, which means
is sits in a read() system call and the interrupt isn't seen until
sometime during evaluation when a safe checkpoint is reached.
When reading from a terminal R will use select() to wait for input and
periodically wake and check for