search for: r_parsevector

Displaying 20 results from an estimated 64 matches for "r_parsevector".

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&...
2019 Dec 14
2
Inconsistent behavior for the C AP's R_ParseVector() ?
...h not yet during parsing. >> > > Thanks Tomas. > > I guess this has do with R expressions being lazily evaluated, and names > of arguments in a call are also part of the expression. Now the puzzling > part is why is that at all part of the parsing: I would have expected > R_ParseVector() to be restricted to parsing... Now it feels like > R_ParseVector() is performing parsing, and a first level of evalution for > expressions that "should never work" (the empty name). > > Think of it as an exception in say Python. Some failures during parsing > result in an...
2019 Dec 09
0
Inconsistent behavior for the C AP's R_ParseVector() ?
...t during > parsing. > > > Thanks Tomas. > > I guess this has do with R expressions being lazily evaluated, and > names of arguments in a call are also part of the expression. Now the > puzzling part is why is that at all part of the parsing: I would have > expected R_ParseVector() to be restricted to parsing... Now it feels > like R_ParseVector() is performing parsing, and a first level of > evalution for expressions that "should never work" (the empty name). Think of it as an exception in say Python. Some failures during parsing result in an exception (...
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...
2019 Dec 14
0
Inconsistent behavior for the C AP's R_ParseVector() ?
...gt; >> >> Thanks Tomas. >> >> I guess this has do with R expressions being lazily evaluated, and names >> of arguments in a call are also part of the expression. Now the puzzling >> part is why is that at all part of the parsing: I would have expected >> R_ParseVector() to be restricted to parsing... Now it feels like >> R_ParseVector() is performing parsing, and a first level of evalution for >> expressions that "should never work" (the empty name). >> >> Think of it as an exception in say Python. Some failures during parsing...
2019 Dec 07
2
Inconsistent behavior for the C AP's R_ParseVector() ?
...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 R's C API:( https://github.com/rpy2/rpy2/blob/master/rpy2/rinterface_lib/_rinterface_capi.py#L509 ). Our specific setup is calling an embedded R from Python, using the cffi library. An error on end was the first possibility considered, but the puzzling specificity of the error (as shown b...
2019 Dec 09
3
Inconsistent behavior for the C AP's R_ParseVector() ?
...riable inside list(), even > though not yet during parsing. > Thanks Tomas. I guess this has do with R expressions being lazily evaluated, and names of arguments in a call are also part of the expression. Now the puzzling part is why is that at all part of the parsing: I would have expected R_ParseVector() to be restricted to parsing... Now it feels like R_ParseVector() is performing parsing, and a first level of evalution for expressions that "should never work" (the empty name). There is probably some error in how the external code is handling R errors > (Fatal error: unable to init...
2009 Jun 18
1
R_parseVector and syntax error [was: error messages while parsing with rniParse]
Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a way to grab the error. It looks like yyerror populates the buffer "R_ParseErrorMsg", but then the variable is not part of the public api. Would it be possible to add yet another entry point to the parser that would basically w...
2019 Dec 14
1
Inconsistent behavior for the C AP's R_ParseVector() ?
...Thanks Tomas. > >> > >> I guess this has do with R expressions being lazily evaluated, and names > >> of arguments in a call are also part of the expression. Now the puzzling > >> part is why is that at all part of the parsing: I would have expected > >> R_ParseVector() to be restricted to parsing... Now it feels like > >> R_ParseVector() is performing parsing, and a first level of evalution > for > >> expressions that "should never work" (the empty name). > >> > >> Think of it as an exception in say Python. Some...
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...
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('...
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 ``` Shoul...
2019 Dec 02
0
Inconsistent behavior for the C AP's R_ParseVector() ?
...not the same thing as zero-length variables in an environment. If you try to convert "lst" from your example to an environment, you would get the error (attempt to use zero-length variable name). Best Tomas On 11/30/19 11:55 PM, Laurent Gautier wrote: > 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...
2019 Dec 09
0
Inconsistent behavior for the C AP's R_ParseVector() ?
...iting R Extensions has more details (and section 8 specifically about embedding R). This is unlike parse (syntax) errors signaled via return value to ParseVector() Best, Tomas > > 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 R's C > API:(https://github.com/rpy2/rpy2/blob/master/rpy2/rinterface_lib/_rinterface_capi.py#L509). > > Our specific setup is calling an embedded R from Python, using the > cffi library. An error on end was the first possibility considered, > but the puzzling specificity...
2019 Nov 30
0
Inconsistent behavior for the C AP's R_ParseVector() ?
...e macros from the generated parser here). The same problem exists at least in the Rd and LaTeX parsers in tools. */ ``` Could this be related to be issue ? Le sam. 30 nov. 2019 ? 14:04, Laurent Gautier <lgautier at gmail.com> a ?crit : > 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...
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 =...
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 <- c(1.234,-3.45)" expression(x <- c(1, -3)) I'm using MS Visual C++. The code works fine in a small test project with the same R startup settings (attached) as in the Bul...
2007 Apr 07
2
Rf_PrintValue problem with methods::show
...ow is detected correctly but then show is not found. "cbind2" in the code below is just a representative object, the same holds for the few other S4 objects I have tried. The following uses r-devel on i686-pc-linux-gnu, but the results are same with R 2.4.1 (with suitable changes to the R_ParseVector call). On powerpc Linux I get a segfault. $ RPROG=R-devel $ ${RPROG} --version | head -1 R version 2.6.0 Under development (unstable) (2007-04-06 r41080) $ export LD_LIBRARY_PATH=`${RPROG} RHOME`/lib $ cat parseEvalS4.c #include <Rinternals.h> #include <Rembedded.h> #include <R_ex...
2007 Jun 12
1
Trouble making JRI.jar with Ubuntu and Java6
Hi, Forum newb here, looking for some help. Have been trying to install an R-Java interface to make R calls from Java. JRI's configure script runs fine, but when it comes to make, I get the "error: too few arguments to function 'R_ParseVector'" Java runs fine. R runs fine. But I can't get this .jar file created. <grumble> Any help would be appreciated immensely, Taivo Ubuntu FeistyFawn, java-6-sun-1.6.0.00, R 2.5 p.s. Here's the screen output: make -C src JRI.jar make[1]: Entering directory `/home/taivo/coop_...
2003 Aug 24
1
declarations in non-exported headers and embedding R
...header? Thanks, Joe =========================================================== Here are the specifics: ----------------------------------------------------------- From non-exported header file ${R_HOME}/src/include/Parse.h ----------------------------------------------------------- extern SEXP R_ParseVector(SEXP, int, int *); #define PARSE_NULL 0 #define PARSE_OK 1 #define PARSE_INCOMPLETE 2 #define PARSE_ERROR 3 #define PARSE_EOF 4 ----------------------------------------------------------- From non-exported header file ${R_HOME}/src/include/Defn.h -------------------------------------------...