similar to: Emulating a REPL in frontends

Displaying 20 results from an estimated 100 matches similar to: "Emulating a REPL in frontends"

2015 Aug 21
0
Problems with embedded R, ReplDLL
Along with getting pqR to work on Windows, I've also been testing it in the context of embedded R, and in the process have found some problems with the examples given of embedded R use. One problem can be seen in R_ReplDLLinit, in src/main/main.c: void R_ReplDLLinit(void) { SETJMP(R_Toplevel.cjmpbuf); R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
2008 Sep 03
8
suggestion of new API function for embedded programming.
While doing some embedded programming and trying to figure out how to generate a hand coded SEXP equivalent of the line "t.test(x,conf.level=(1-p))$conf.int[2]" I had an idea for an addition to the embedded API. There are a number of hidden or static parse functions (R_ParseBuffer, R_Parse1Buffer, etc.) which take an IoBuffer* and returns a parsed tree. If one or more of these
2010 Aug 20
2
segfault in embedded r after call to repldlldo1
Dear R developers, i've got a question concerning an embedded R instance. I called the initialization routines as seen in the "writing extensions" guide (Rf_initialize, setup_Rmainloop and R_ReplDLLinit). I also changed the function callback pointer of readconsole and writeconsoleex to my local functions. when i call mainloop there is no problem and the commands are evaluated
2000 Nov 07
0
error handling
Hello R developers, Platform: Windows 2000. Compiler: GNU GCC - 2.95.2 (CRTDLL) I have a C function for evaluating commands using eval(SEXP,SEXP) which is included in a personal make of R.dll. (Similiar to R_Proxy_evaluate() in rproxy_impl.c) Using SETJMP to catch errors works but there is a problem. For example, the following code: if (SETJMP(R_ToplevelContext->cjmpbuf)) //
2007 Nov 07
1
problem in linking to libR.so with R 2.5.0
Dear All, I tried to write a C++ program that uses R internals and I encounter "undefined reference" error when linking to libR.so. Here is an small example of the program test.cpp: extern "C" { #include <config.h> #include <IOStuff.h> int main(int argc, char** argv) { R_IoBufferInit(&R_ConsoleIob); return 0; } } I built it using: g++ -o test
2001 Mar 30
1
Problem with rtest.c
I have some problems with the rtest.c example under gnuwin32\front-ends I am able to build it and it runs without problems. But when I give it a command that isn't defined it crashes. This only happens when I build it in then complicate case where it uses R_ReplDLLdo1(). Any help would be appreciated. Ps. Sorry my poor English
2023 Apr 26
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
? Sun, 23 Apr 2023 13:33:16 -0400 Laurent Gautier <lgautier at gmail.com> ?????: > When tracing what happens during an error I found that > verrorcall_dflt() in src/main/errors.c calls PrintWarnings(). That > function is not part of R's C-API though. I've tried reading the source code and came to a similar conclusion. PrintWarnings() is required for warnings() to work
2003 Jan 30
0
printing of attributes does not dispatch on class (PR#2506)
Forwarded to R-bugs to log this. It may or may not be a bug, but it is a desirable enhancement, if a tricky one. Note that this is not simple: in R-devel it may be show() not print() that was called (and needs to be dispatched on, although print.default will do that) and the print functionality can be called directly from C code, e.g. by PrintValue. Also, auto-printing as in the example does
2008 Feb 15
0
R crashes with debug()
I know this may be a pathological case, but I found it while debugging PopCon: Invoking a debugged function prior to the conclusion of setup_Rmainloop() will cause R to crash because R_ConsoleIob is not initialized until run_Rmainloop(). Tested in R-2-6-branch and trunk on Linux. Crash it like this from a shell command line: $ cat >> ~/.Rprofile <<EOF foo <- function()
2013 May 25
0
segfault when using browser() in Rprofile.site
Hi. It seems that if I put a browser() in my Rprofile.site, I get a segfault. This happens on several machines, several versions of R. Here it the valgrind output when using revision 62797: ==31314== Memcheck, a memory error detector ==31314== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==31314== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==31314==
2005 Sep 22
1
Rf_initEmbeddedR in Windows
Hi All My C++/linux program uses Rf_initEmbeddedR to start R and then calls some R functions. Now I try to port it to Windows. Give the fact that Rf_initEmbeddedR is missing in Windows, I try to use the implmentation in Rserve by Simon Urbanek. When I build in MS Visual Studio, I get the following linking error error LNK2019: unresolved external symbol __imp__putenv referenced in function
2018 Mar 01
0
Small program embedding R crashes in 64 bits
Hi everyone, I'm trying to create a small C++ program which embed R, but I'm having problems when I try to do it on Windows 64 bits. I have created a minimal reproducible example which is just the src/gnuwin32/front-ends/rtest.c file with the R_ReplDLLdo1() loop, the only difference is that I set the interactive mode to TRUE. Here is the cpp file:
2012 Aug 20
0
Problem with initializiing R main loop under Windows (R.dll-version: 2.15.1)
Dear R-developers, even though I may not be the first one to encounter the problem described below, I would really appreciate some help or a link to a forum where this topic is being discussed. Probably I am simply misinformed on the usage of structRstart but see for youselve. I did check multiple forums and the whole internet on the topic without success. I am using the shared library version
2012 Feb 03
2
Hanging -- please help decipher event report
I'm running some code in R64 on a Mac OS 10.6.8 that calls a C program through the dyn.load() function. The code hangs after several days of computation, and I've having trouble locating the problem. Can anyone decipher this info from the error report, and tell me if this is a problem in R64, or in the C code? Thanks very much in advance. A few hints: "pa" is the name of the C
2006 Aug 31
2
stop R mainloop without calling exit(1)
Hello, I'm trying to make my Java application work with R, which involves sending and retrieving data and to run R functions from within the Java application. I also need to have "live interaction" with R, to show the R console output (e.g. warnings and print) and to enable the user to enter input when a function asks for it. Therefore I created a simple R console in Java using JRI
2012 Feb 29
0
R 2.14.2 is released + R anniversary
The build system rolled up R-2.14.2.tar.gz (codename "Gift-Getting Season") at 9:00 this morning. This is intended to be the final round-up release of the 2.14 series; see the list below for details. (The codename is still not part of the actual sources. That feature will have to wait for 2.15.0, "Easter Beagle"). This release also marks the 3rd anniversary of R-1.0.0. You
2012 Feb 29
0
R 2.14.2 is released + R anniversary
The build system rolled up R-2.14.2.tar.gz (codename "Gift-Getting Season") at 9:00 this morning. This is intended to be the final round-up release of the 2.14 series; see the list below for details. (The codename is still not part of the actual sources. That feature will have to wait for 2.15.0, "Easter Beagle"). This release also marks the 3rd anniversary of R-1.0.0. You
2013 Oct 30
2
Huge performance difference between implicit and explicit print
Hi all, Can anyone help me understand why an implicit print (i.e. just typing df at the console), is so much slower than an explicit print (i.e. print(df)) in the example below? I see the difference in both Rstudio and in a terminal. # Construct large df as quickly as possible dummy <- 1:18e6 df <- lapply(1:10, function(x) dummy) names(df) <- letters[1:10] class(df) <-
2023 Apr 23
1
Warnings created during R_eval or R_tryEval not shown before R ending or R error.
Hi, I have an embedded R, with the evaluation of expressions happening over time during the lifespan of the process. I tried either `R_eval()` and `R_tryEval()` for the evaluation. The issue I have is that the processing of warnings does 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
2008 Apr 09
2
zaptel 1.2.25 compilation error
Zaptel seems to compile fine until I enter xpp/utils and make there. I get: xpp/utils # make cc -o print_modes -g -Wall print_modes.c print_modes.c: In function `main': print_modes.c:9: error: `fxo_modes' undeclared (first use in this function) print_modes.c:9: error: (Each undeclared identifier is reported only once print_modes.c:9: error: for each function it appears in.)