similar to: Inconsistent behavior for the C AP's R_ParseVector() ?

Displaying 20 results from an estimated 2000 matches similar to: "Inconsistent behavior for the C AP's R_ParseVector() ?"

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 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 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 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 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
2019 Dec 02
0
Inconsistent behavior for the C AP's R_ParseVector() ?
Dear Laurent, could you please provide a complete reproducible example where parsing results in a crash of R? Calling parse(text="list(''=123") from R works fine for me (gives Error: attempt to use zero-length variable name). I don't think the problem you observed could be related to the memory leak. The leak is on the heap, not stack. Zero-length names of elements in a
2019 Dec 09
0
Inconsistent behavior for the C AP's R_ParseVector() ?
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 are variables assigned to > an environment) ? The emitted R error (in the R console) is not a
2019 Nov 30
0
Inconsistent behavior for the C AP's R_ParseVector() ?
I found the following code comment in `src/main/gram.c`: ``` /* Memory leak yyparse(), as generated by bison, allocates extra space for the parser stack using malloc(). Unfortunately this means that there is a memory leak in case of an R error (long-jump). In principle, we could define yyoverflow() to relocate the parser stacks for bison and allocate say on the R heap, but yyoverflow() is
2019 Dec 09
0
Inconsistent behavior for the C AP's R_ParseVector() ?
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 > <mailto: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 >>
2019 Dec 14
0
Inconsistent behavior for the C AP's R_ParseVector() ?
Laurent, the main point here is that ParseVector() just like any other R API has to be called in a correct context since it can raise errors so the issue was that your C code has a bug of not setting R correctly (my guess would be your'e not creating the initial context necessary in embedded R). There are many different errors, your is just one of many that can occur - any R API call that
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)
2008 Mar 19
1
R_ParseVector problem: it's cutting off after the decimal point
Dear all, my aim is to integrate R in an interactive visualisation software called Bulk Analyzer developed by VrVis (http://www.vrvis.at). the code: SEXP e, tmp; ParseStatus status; PROTECT(tmp = mkString("x <- c(1.234,-3.45)")); PrintValue(tmp); PROTECT(e = R_ParseVector(tmp, -1, &status, R_NilValue)); PrintValue(e); UNPROTECT(2); produces the following output: [1] "x
2008 Aug 04
2
Parsing code with newlines
Dear List, When I try to parse code containing newline characters with R_ParseVector, I get a compilation error. How can I compile code that includes comments and newlines? I am using the following: void* my_compile(char *code) { SEXP cmdSexp, cmdExpr = R_NilValue; ParseStatus status; PROTECT (cmdSexp = allocVector (STRSXP, 1)); SET_STRING_ELT (cmdSexp, 0, mkChar (code));
2007 Apr 07
2
Rf_PrintValue problem with methods::show
Hi, I think this is a bug (even though I can't find documentation explicitly saying that it should work). Basically, Rf_PrintValue(obj) fails when 'obj' is an S4 object that should be printed using show() rather than print(). From the error message I'm guessing that the need to use show is detected correctly but then show is not found. "cbind2" in the code below is just
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
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
2004 Feb 11
1
About the macro defined in Rinternals.h
Hello everyone, I try to write a c++ code which calls embedded R and uses some of R internal functions. What I read is just lots of macro names defined in the Rinternals.h or Rdefines like R_Parse, Rf_install and so on. But where can I get the detailed information about the parameters of these macro? For example, what about the parameters of SEXP R_ParseVector(SEXP, int, ParseStatus *)?
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
2018 Oct 07
4
Warning when calling formals() for `[`.
Hello, I don't see why you say that the documentation seems to be wrong: class(args(`+`)) #[1] "function" args() on a primitive does return a closure. At least in this case it does. Rui Barradas ?s 14:05 de 07/10/2018, Peter Dalgaard escreveu: > There is more "fun" afoot here, but I don't recall what the point may be: > >> args(get("+"))
2009 May 19
2
About " Error: C stack usage is too close to the limit"
Hi everyone! I meet one problem when embedding R in C code, when I run the the R code in one child thread , it always print error info: Error: C stack usage is too close to the limit I also try to set R_CStackLimit = (uintptr_t)-1 to disable the C stack check as the R-exts doc say, but it still does not work, the error info still exist. Besides it is interesting that if i