Displaying 20 results from an estimated 33 matches for "r_interact".
Did you mean:
interact
2002 Aug 22
0
R_Interactive decision to halt execution during errors
Hi,
I'm currently trying to use R as a back-end from an interface (you may have
seen me on the help list), and I'm running into something that is rather
confusing. The following lines in main/errors.c of R 1.5.1:
439: if ( !R_Interactive && !haveHandler && inError ) {
440: REprintf("Execution halted\n");
441: R_CleanUp(SA_NOSAVE, 1, 0); /* quit, no save, no .Last, status=1
*/
442: }
Which seems to not make any sense at all. I've scoured the code and can't
figure out what the...
2015 Apr 29
2
--interactive and -f/-e
...n Windows), it assumes
that it is interactive if ?stdin? is connected to a (pseudo-)terminal
and not if ?stdin? is redirected to a file or pipe. Command-line options
--interactive (Unix) and --ess (Windows, |Rterm.exe|) override the
default assumption"
But the code in system.c does this:
R_Interactive = R_Interactive && (force_interactive || isatty(0));
R_Interactive is set to FALSE in the -e/-f processing, and
force_interactive is set to TRUE in the --interactive processing, so
there is no way that it can ever override -e/-f. It seems that
--interactive can only have an effect fo...
2007 Jul 04
2
problem with findFun call from embedded R
...maybe it should be wrapped
in something similar to R_ToplevelExec?
==========================
On a related note, I found during my PL/R debugging that the segfault
was causing the same console based, interactive, "*** caught segfault
***" logic to execute. I was able to confirm that R_Interactive was set
to TRUE in my PL/R session.
It seems that Rf_initEmbeddedR() sets R_Interactive to TRUE and depends
on the output of isatty() to change it to FALSE in Rf_initialize_R() if
there is no tty. Unfortunately, the most common methods for starting
Postgres leave the tty attached (stdout an...
2015 Apr 29
0
--interactive and -f/-e
...e if ?stdin? is connected to a (pseudo-)terminal
> and not if ?stdin? is redirected to a file or pipe. Command-line options
> --interactive (Unix) and --ess (Windows, |Rterm.exe|) override the
> default assumption"
> But the code in system.c does this:
> R_Interactive = R_Interactive && (force_interactive || isatty(0));
> R_Interactive is set to FALSE in the -e/-f processing, and
> force_interactive is set to TRUE in the --interactive processing, so
> there is no way that it can ever override -e/-f. It seems that
> --in...
2013 Nov 21
2
Running R embedded in an mpiexec spawned process - Fatal error: you must specify '--save', '--no-save' or '--vanilla'
...on = StartupRestoreAction.NoRestore,
NoRenviron = false
};
rEngine.Initialize(rStartParams); // calls the R API R_SetParams, then setup_Rmainloop
I gather that the following is hit in src/R-3.0.2/src/unix/system.c, in the function Rf_initialize_R:
if (!R_Interactive && Rp->SaveAction != SA_SAVE &&
Rp->SaveAction != SA_NOSAVE)
R_Suicide(_("you must specify '--save', '--no-save' or '--vanilla'"));
I don't understand why it would complain if spawned by mpiexec and fine otherwise.
I do not have a...
2009 Sep 03
1
Running an expression 1MN times using embedded R
...rn(R_NilValue);
}
for(i = 0; i < Rf_length(cmdexpr); i++)
ans = R_tryEval(VECTOR_ELT(cmdexpr, i),NULL,&Rerr);
UNPROTECT(2);
return(ans);
}
int embedR(int argc, char **argv){
structRstart rp;
Rstart Rp = &rp;
R_DefParams(Rp);
Rp->NoRenviron = 0;
Rp->R_Interactive = (Rboolean)1;
R_SetParams(Rp);
R_SignalHandlers=0;
if (!getenv("R_HOME")) {
fprintf(stderr, "R_HOME is not set. Please set all required
environment variables before running this program.\n");
return(-1);
}
int stat= Rf_initialize_R(argc,(char **) a...
2007 Feb 21
3
non-interactive R_tryEval does not return
...at least I think that is what happens, at least on some
configurations. Here's a repeatable example:
cd R_HOME/tests/Embedding
touch tmp.R
make tryEval
and then (correct)
> ./tryEval --slave
Error in sqrt("") : Non-numeric argument to mathematical function
Caught an error calling sqrt(). Try again with a different argument.
[1] 3
versus (non-interactive; no return)
>
2000 Mar 16
2
R-1.0.0 on alpha/osf1 memory glitch (PR#490)
Digital Alpha (various), Digital UNIX V4.0[EF], R-1.0.0, gcc, f77
When using batch mode with the save option, an error message is issued.
However [I have just discovered that] it appears that the operation
does complete, i.e. the .RData file is saved successfully. The main
problem is that the return code is non-zero (and so it is impossible to
distinguish this "non-error" from some
2008 Mar 19
1
R_ParseVector problem: it's cutting off after the decimal point
...n: a user is asked a question an should answer
with YesNoCancel (maybe dialog)
Rp->YesNoCancel = myYesNoCancel;
// on R state changed: busy(=1)/idle(=0)
Rp->Busy = myBusy;
Rp->home = getRUser();
// R-Settings...
Rp->R_Quiet = (Rboolean)FALSE;
Rp->R_Interactive = (Rboolean)TRUE;
Rp->RestoreAction = SA_RESTORE;
Rp->SaveAction = SA_NOSAVE;
// our parameters
R_SetParams(Rp);
R_set_command_line_arguments(0, NULL);
GA_initapp(0, NULL);
readconsolecfg();
/// run_Rmainloop() starting in a different thread
2000 Jun 21
1
Port of R header files to Delphi
I'm in the process of porting R header files to Delphi. The short
term aim is to be able to make calls into the R.dll from Delphi; the
longer term aim is to play around with writing a Windows front-end
with some of the features of the S-PLUS environment (e.g. scripts),
and other features from other IDEs I've used (e.g. watch windows,
popup values of variables selected by mouse, etc.)
2009 Jan 08
1
Callbacks seems to get GCed.
...int argc = 4;
DllInfo *info;
setenv("R_HOME","/usr/lib/R",0);
structRstart rp;
Rstart Rp = &rp;
R_setStartTime();
R_DefParams(Rp);
Rp->R_Quiet = TRUE;
Rp->RestoreAction = SA_RESTORE;
Rp->SaveAction = SA_NOSAVE;
R_SetParams(Rp);
R_Interactive = TRUE;
Rf_initialize_R(argc, argv);
setup_Rmainloop();
R_ReplDLLinit();
info = R_getEmbeddingDllInfo();
R_registerRoutines(info, cMethods, callMethods, NULL, NULL);
}
int main (int argc, char** argv)
{
int i;
initR();
r_exec("x <- function (f) { .Call(\"s...
2002 Oct 30
4
Flushing the R output buffer.
flusHi,
I am connecting R to a PHP web script.
The first effort attempted to use a named pipe
but gave up on that because PHP could not read
any data from the named pipe.
I changed to using a temp file but it also has problems.
It appears that the file to which R's output is redirected
is not recieving any output until the pipe connection form PHP
is closed. I think this means that R is
2006 Nov 27
1
R.DLL mapping by P/Invoke
...No = -1,
Cancel = 0
};
enum RUIMode
{
RGui = 0, RTerm, LinkDLL
};
[StructLayout(LayoutKind.Sequential)]
struct RStartStruct
{
public RBool R_Quiet;
public RBool R_Slave;
public RBool R_Interactive;
public RBool R_Verbose;
public RBool LoadSiteFile;
public RBool LoadInitFile;
public RBool DebugInitFile;
public SaType RestoreAction;
public SaType SaveAction;
public uint vsize;
public uint nsize;...
2023 Apr 23
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
...not happen until the process exits and/or R is shut down.
Evaluating `warnings()` returns NULL (NILSXP).
It seems like the warnings are stuck in a list out of `warnings()`'s reach,
waiting to be processed. I cannot seem to find why or how to force that to
happen. The embedded R is interactive (R_Interactive is 1).
Moreover, when the evaluation of another R expression after the warnings
results in an R error I get the error message shown followed by pending
warnings. When tracing what happens during an error I found that
verrorcall_dflt() in src/main/errors.c calls PrintWarnings(). That function
i...
1997 Aug 02
0
R-alpha: .RData zapped by system shutdown
...rminated.
Fix? First of all, I suggest that the original .RData be rename()'d
before it is opened for writing (the backup may or may not be removed
afterwards). Secondly, do we really want this behaviour where isatty()
is called at a very late stage, or would we rather have the logic
depend on R_interactive? The cases to consider is when an interactive
session gets backgrounded, or loses its controlling terminal. And
shouldn't there be a signal handler for the TERM signal, to ensure
that things get wrapped up?
[Fortunately, the important bits of that workspace had been dumped out
previously, s...
2000 Oct 03
0
FW: Parse Errors
Earlier I posted the message below to R-announce. Please, let me appologize
for this mistake, it was not intended. The solution was provided by Duncan
Murdoch who passed on a message he recieved from Brian Ripley which informed
me that settimg R_Interactive to 1 changes the default behavor of aborting
on an error.
Thankyou, Don Wingate.
-----Original Message-----
From: Don Wingate [mailto:Don.Wingate@IntelliChem.com]
Sent: Tuesday, October 03, 2000 9:35 AM
To: r-announce@lists.R-project.org
Subject: Parse Errors
Dear R Development Team,
Using...
2007 Dec 11
1
Interactiveness
...re doing it. They are of course intended to be a
feature, but in this case it causes us trouble. Would it be possible to
get a command line switch to control this behaviour? I'm not sure pseudo
terminals can be used portably, or can they? Are those few lines with
the isatty's, which set R_Interactive to FALSE, the only places that
need to be patched (besides adding the switch somewhere)? Should I send
in a complete patch or is a request for functionality sufficient?
Lots of questions there, grateful for any answers! :-)
Bjarni
--
INFORMATION WANTS TO BE FREE
2010 Aug 15
0
Disable interaction in R to use with Rserve
...mirrors. When
this happens, Rserve does not return; it just waits there, and the Rserv
connection becomes unattainable.
As a possible solution, we tried to disable R interactive mode (see
?interactive). The CRAN package 'interactivity' provides a function to
toggle C level global variable R_Interactive. However, setting interactive
mode to false, also results in that R exits the R session on every error.
This is not what we want, we would like to keep the R sesion alive and leave
the R error handling unaffected, and only suppress any prompts or dialogs
that prevent the call from returning.
[...
2012 Aug 20
0
Problem with initializiing R main loop under Windows (R.dll-version: 2.15.1)
...don't init the R-server
if (!connectToGui()) return;
// set the start time
R_setStartTime();
// Definel callback handler struct
structRstart RParams;
R_DefParams (&RParams);
RParams.R_Quiet = FALSE; //
RParams.R_Interactive = TRUE;
RParams.R_Verbose = FALSE;
RParams.R_Slave = FALSE;
RParams.RestoreAction = SA_RESTORE;
RParams.SaveAction = SA_NOSAVE;
RParams.rhome = get_R_HOME ();
RParams.home = getRUser ();
RParams.C...
2007 Oct 17
0
Using R.dll in .NET IPC
...No = -1,
Cancel = 0
};
enum RUIMode
{
RGui = 0, RTerm, LinkDLL
};
[StructLayout(LayoutKind.Sequential)]
struct RStartStruct
{
public RBool R_Quiet;
public RBool R_Slave;
public RBool R_Interactive;
public RBool R_Verbose;
public RBool LoadSiteFile;
public RBool LoadInitFile;
public RBool DebugInitFile;
public SaType RestoreAction;
public SaType SaveAction;
public uint vsize;
public uint nsize;...