similar to: Parsing code with newlines

Displaying 20 results from an estimated 400 matches similar to: "Parsing code with newlines"

2013 Oct 16
1
Parallel R expression evaluations
Hi all, I am using R-3.0.1 under Linux platform to embed R into my C++ code. I am facing an error while executing more than 1 R-expressions parallelly. I am executing round(X) and abs(X) parallelly on a set of 50 input rows which resulted in segmentation fault after getting the following errors. Error: unprotect_ptr: pointer not found Error: argument to 'findVar' is not an environment
2009 Jan 08
1
Callbacks seems to get GCed.
Dear list, I am trying to implement a publish-subscribe mechanism in for an embedded R interpreter. But somehow my registered closures seem to get collected by the GC, even though I have protected them. I have reducted my code to the following sample. Sorry if it is a little verbose. The first couple of call of calls still work, but at some point one of the callbacks (callback1 in my
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:
2012 Feb 01
3
Crash in R using embedded.
Hi, I'm new to R, and am trying to embed R into another application. I'm calling gev.fit() from the ismev package, and it is crashing somewhere inside it. gdb is not catching it, and valgrind is not showing any memory corruption issues. I suspect it's memory corruption, because it doesn't crash in exactly the same spot each time. I'm running R 2.12.2 on a 64 bit linux (Ubuntu
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
2008 Jul 18
0
Rcpp from C++
Hi Sri, I haven't really elaborated on it having other stuff to prepare first, but as far as I got you first assign data to a vector: #include <R.h> #include <Rinternals.h> #undef R_INTERFACE_PTRS #include <Rembedded.h> #include "Rcpp.hpp" #include <R_ext/Parse.h> #include <Rinternals.h> #include <Rdefines.h> //assigning a vector SEXP
2019 Apr 05
2
Parsing code with newlines
Hello! This is my first post here. I came across the very same problem. It can be reproduced within modified tests/Embedding/RParseEval.c Actually this example has another issue, namely it doesn't wrap everything in R_ToplevelExec . This is a major show stopper for newcomers as that function is barely mentioned anywhere and longjmp into terminated setuploop function followed by R_suicide
2008 Jan 02
1
setting the seed in standalone code using Rlib
Hi, Is the below -- setSeed -- an okay way to set the seed in standalone applications making use of Rlib? It seems to work as expected. Is there a better way to do it? (I'm also looking at do_setseed but am unsure what to supply as op. findFun("set.seed", R_GlobalEnv)?) Thanks much. -- David Faden, dfaden at iastate.edu AIM: pitulx -- #include <assert.h> #include
2003 Aug 24
1
declarations in non-exported headers and embedding R
Hello, I've been using R embedded in PL/R (R procedural language handler for PostgreSQL, http://www.joeconway.com/plr/) very successfully for several months now. A sincere "thank you" goes to the R development team for such a great product. I have a question I'm hoping someone here can help me with. In order to get the required functionality out of PL/R, I've had to
2006 Nov 27
1
R.DLL mapping by P/Invoke
After a long processing, I was able to create a version of a small C# class that was able to emulate the rproxy by P/Invoke. This is mostly to find a workaround a performance problem of the StatConnector. It's almost work but ... I have strange memory exception when I call the print function. The variable seems to not survive from one call to the other. As there is no debug symbol for
2007 Jan 17
2
R_ParseVector API change
Dear R developers, just a quick question: I noted that R_ParseVector () has gained an additional parameter (since SVN rev. 39999). Since R_ParseVector () is part of the public API, I'm wondering, whether this API change was intentional or not. Either way is fine with me, but in order to make sure the next release of RKWard will be compilable with R 2.5.0, I'd like to make sure,
2019 Dec 14
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Le lun. 9 d?c. 2019 ? 09:57, Tomas Kalibera <tomas.kalibera at gmail.com> a ?crit : > On 12/9/19 2:54 PM, Laurent Gautier wrote: > > > > Le lun. 9 d?c. 2019 ? 05:43, Tomas Kalibera <tomas.kalibera at gmail.com> a > ?crit : > >> On 12/7/19 10:32 PM, Laurent Gautier wrote: >> >> Thanks for the quick response Tomas. >> >> The same error
2019 Dec 07
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Thanks for the quick response Tomas. The same error is indeed happening when trying to have a zero-length variable name in an environment. The surprising bit is then "why is this happening during parsing" (that is why are variables assigned to an environment) ? We are otherwise aware that the error is not occurring in the R console, but can be traced to a call to R_ParseVector() in
2019 Dec 09
3
Inconsistent behavior for the C AP's R_ParseVector() ?
Le lun. 9 d?c. 2019 ? 05:43, Tomas Kalibera <tomas.kalibera at gmail.com> a ?crit : > On 12/7/19 10:32 PM, Laurent Gautier wrote: > > Thanks for the quick response Tomas. > > The same error is indeed happening when trying to have a zero-length > variable name in an environment. The surprising bit is then "why is this > happening during parsing" (that is why
2019 Nov 30
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Hi again, Beside R_ParseVector()'s possible inconsistent behavior, R's handling of zero-length named elements does not seem consistent either: ``` > lst <- list() > lst[[""]] <- 1 > names(lst) [1] "" > list("" = 1) Error: attempt to use zero-length variable name ``` Should the parser be made to accept as valid what is otherwise possible
2019 Dec 14
1
Inconsistent behavior for the C AP's R_ParseVector() ?
Hi Simon, Widespread errors would have caught my earlier as the way that code is using only one initialization of the embedded R, is used quite a bit, and is covered by quite a few unit tests. This is the only situation I am aware of in which an error occurs. What is a "correct context", or initial context, the code should from ? Searching for "context" in the R-exts manual
2006 Apr 18
2
typos in src/main/gram.y (PR#8780)
In src/main/gram.y, the documentation for R_ParseVector has a wrong signature: SEXP R_ParseVector(TextBuffer *text, int n, ParseStatus *status) should be SEXP R_ParseVector(SEXP text, int n, ParseStatus *status) In addition, the two occurrences of "IOBuffer" in the documentation should be replaced by "IoBuffer". version.string = Version 2.3.0 beta (2006-04-14 r37779)
2019 Nov 30
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Hi, The behavior of ``` SEXP R_ParseVector(SEXP, int, ParseStatus *, SEXP); ``` defined in `src/include/R_ext/Parse.h` appears to be inconsistent depending on the string to be parsed. Trying to parse a string such as `"list(''=1+"` sets the `ParseStatus` to incomplete parsing error but trying to parse `"list(''=123"` will result in R sending a message to the
2007 May 29
1
question about R_ParseVector function
Hi r-devel, The R_ParseVector has been changed in R-2.5.0, and there is a simple description about the 4th argument at http://stat.ethz.ch/R-manual/R-patched/NEWS, it says that: "R_ParseVector() has a new 4th argument 'SEXP srcfile' allowing source references to be attached to the returned expression list. " I do not quite understand the purpose of adding the 4th argument. Would
2019 Apr 10
0
Parsing code with newlines
On 4/5/19 8:14 AM, Mikhail Titov wrote: > Hello! > > This is my first post here. I came across the very same problem. > It can be reproduced within modified tests/Embedding/RParseEval.c Please check https://www.r-project.org/posting-guide.html and update your post if you still need to get help here - from your current post I am not sure what you did, what was the error you got and