Displaying 20 results from an estimated 100 matches similar to: "RFC: API to allow identification of warnings and errors in the output stream"
2005 Oct 10
2
Catching warning and error output
Hi all,
I'm working on a GUI frontend for R, and I'm looking for a good way to catch
all warning- and error-output. The reason for this is mostly, that I would
like to know, which sections of the output are "normal" output, warnings, and
errors. This would allow for some nice features, such as highlighting
warnings and errors in a different color, or popping up a message
2007 Apr 03
2
R callbacks
Hi,
I'm trying to understand (mostly from the R-exts manual) how to use
the callbacks declared in Rinterface.h. As a first attempt, I'm trying
to redefine ptr_R_WriteConsole in a very trivial manner. Here's my
code:
---------------
$ cat altr.c
int Rf_initialize_R(int ac, char **av);
#define R_INTERFACE_PTRS 1
#include <Rinterface.h>
extern int R_running_as_main_program;
2005 Sep 12
1
ptr_R_EditFile, R_WriteConsole, and R_ShowMessage
Hi!
I have an application embedding R. For that of course, it is great, that since
R 2.1.0 the pointers in Rinterface.h allow me to override some callbacks,
easily. However, after implementing/overriding a couple of those, I'm a bit
confused about when exactly they get called. So, here are a few specific
questions:
ptr_R_EditFile:
I can find exactly one point in the R-sources where
2009 Sep 03
1
Running an expression 1MN times using embedded R
Hello,
I'm evaluating this expression
expression({ for(x in 1:5){ .Call('rh_status','x') }})
a million times from a program with R embedded in it. I have attached
reproducible code that crashes with
Program received signal SIGSEGV, Segmentation fault.
0x00002b499ca40a6e in R_gc_internal (size_needed=0) at memory.c:1309
1309 FORWARD_NODE(R_PPStack[i]);
Current language:
2011 Jun 16
4
Controlling stdin and stdout in an embedded R instance
Hello,
I am very new to R but my question is with respect to the C API for
working with an embedded R console. I have been able to start and stop
an embedded R console from within a C program as well as use the API to
execute commands in it. I am seeking a mechanism to individually send
native R commands to an embedded console and then consume the output of
these commands. Specifically, I
2010 Jul 21
1
Plot window does not update in embedded code
Dear list,
I am trying to embed R into a C++ program. After some tinkering,
reading the documentation and browsing the source code I have this
more or less working. A very very condensed and very simplified
version of the code is included below.
The program can create plots. However, after the plot is initially
drawn it is no longer updated. When scaling or updating the plot the
window becomes
2008 Apr 29
2
Calling R from C - part way there but need a push!
Dear All,
I've read the manual on "Writing R Extensions" and in particular the
part on calling R from C. (Most of the manual is about calling C
from R, not the other way around.)
The good news is that I can now call _some_ R from C, specifically
the R functions which have C header files. However it isn't clear to
me how to call R functions that are written in R. I
2004 Aug 18
3
R as shared library
Hello folks,
I'm embarking on a project to embed R into the Apache web server, and
I'd like your help. Currently, I'm looking for a way for R code to call
back into a shared library from which the R shared library was loaded.
Essentially, apache starts and loads mod_R.so which runs an
initialization routine which calls Rf_initEmbeddedR() and the following
code:
/* override to
2010 May 06
1
R on kdeedu-svn library problem
Hello,
I am new to this list. ?I am trying to compile the current svn version of
kdeedu on an amd64 linux machine ?which uses R and I get the following
compiler output.
-------------------------------------------
?79%] Building CXX object
cantor/src/backends/R/rserver/CMakeFiles/cantor_rserver.dir/rserver.o
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp: In member
function
2011 Nov 11
1
When collected warnings exceeds 50
Hi,
I've been tracking down a memory leak in an rApache application,
http://data.vanderbilt.edu/rapache/bbplot. The code was deployed in
2007 and has survived numerous upgrades of both R and rApache
(including upgrades and bugs in RMySQL). It's written in such a way so
that web crawlers will download every possible URL the app will
create. It's not a high-traffic app, but just about
2005 Sep 22
3
warning.expression?
Hi!
I'm trying to catch all warning-messages for special handling. It seems
options (warning.expression=myfunc ()) can be used for that. However, the
question is: How can I get at the actual warning in myfunc ()? Apparently in
S, you can use .C("get_last_message") for that. Is there a similar mechanism
in R?
Thanks for your help!
Thomas
2005 Sep 22
3
warning.expression?
Hi!
I'm trying to catch all warning-messages for special handling. It seems
options (warning.expression=myfunc ()) can be used for that. However, the
question is: How can I get at the actual warning in myfunc ()? Apparently in
S, you can use .C("get_last_message") for that. Is there a similar mechanism
in R?
Thanks for your help!
Thomas
2006 Sep 29
1
Possible bug in Rcons_vprintf
In R-2-4-branch r39548, Rcons_vprintf is called from stdout_vfprintf
when R_Outputfile is NULL. When called and output is greater than
R_BUFSIZE, output is truncated to R_BUFSIZE. Here's a one-line fix:
Index: src/main/printutils.c
===================================================================
--- src/main/printutils.c (revision 39548)
+++ src/main/printutils.c (working
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
When large calls cause errors R may stall for extended periods.? This
is particularly likely to happen with `do.call`, as in this example
with a 24 second stall:
??? x <- runif(1e7)
??? system.time(do.call(paste0, list(abs, x)))? # intentional error
??? ## Error in (function (..., collapse = NULL)? :
??? ##?? cannot coerce type 'builtin' to vector of type 'character'
??? ##
1999 Aug 26
0
use dyn.load to redefine R internal fns?
I would like to redefine some R print functions (Rprintf for example) so
that they don't print to stdout, but save the output in a global string
array. I can compile and link my definition of Rprintf into a library and
load it with dyn.load. I don't get an error message, but afterwards the
original function is still valid, my new version isn't executed.
Is there a way to change R
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
Luke, thanks for considering the issue.? I would like to
try to separate the problem into two parts, as I _think_
your comments address primarily part 2 below:
1. How can we avoid significant and possibly crippling
?? stalls on error with these non-standard calls.
2. What is the best way to view these non-standard calls.
I agree that issue 2. requires further thought and
discussion under a
2019 Jul 16
1
[External] Mitigating Stalls Caused by Call Deparse on Error
We also have a few other suggestions and wishes about backtrace
storage and display on the one hand, and display of constructed calls
on the other hand. Perhaps it would be better to open a different
wishlist item for traceback() to keep the discussions focused?
FWIW I think deparsing backtraces lazily is a great idea. Displaying 1
line per call by default in interactive sessions, while being
2019 Jul 14
0
[External] Mitigating Stalls Caused by Call Deparse on Error
This is probably best viewed in the context of other issue with
displaying calls, such as issues arising from calls constructed in
non-standard evaluation contexts. Might be good to move to a wishlist
item in bugzilla.
Best,
luke
On Sat, 13 Jul 2019, brodie gaslam via R-devel wrote:
> When large calls cause errors R may stall for extended periods.? This
> is particularly likely to happen
2006 Feb 03
1
Interfacing C-code (gets and printf) under WINDOWS (Visual C++)
Hi
I try to develop a R interface to a set of C routines, in order to
produce a R-package on Geostatistics.
My C-code uses interaction with the user as I use printf and gets
statements.
I develop the code in a LINUX environment and do not face any problem
having the questions and answers routed on my current Terminal.
When I tried to port the package on Windows, the problems began. No
message
2019 Jul 15
0
[External] Mitigating Stalls Caused by Call Deparse on Error
Better to add this to the wishlist item. This all needs to be looked
at together, and nothing is likely to happen until after
vacation/conference season. It will disappear from everyone's radar
if it is just in R_devel.
Best,
luke
On Sun, 14 Jul 2019, brodie gaslam wrote:
> Luke, thanks for considering the issue.? I would like to
> try to separate the problem into two parts, as I