Re: [Rd] Parsing code with newlines

2019-04-11 Thread peter dalgaard
”\r" is CR not LF. On systems that use CRLF as newline, the combination should be "\n" at the C (or R) level. However, I suppose there is no particular reason not to treat CR as whitespace, as does happen with FF and HT. -pd > On 11 Apr 2019, at 01:59 , Mikhail Titov wrote: > > The barely

Re: [Rd] Parsing code with newlines

2019-04-10 Thread Mikhail Titov
On Wed, Apr 10, 2019 at 5:06 AM, Tomas Kalibera wrote: >> 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

Re: [Rd] Parsing code with newlines

2019-04-10 Thread Tomas Kalibera
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

Re: [Rd] Parsing code with newlines

2019-04-05 Thread Mikhail Titov
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

[Rd] Parsing code with newlines

2008-08-04 Thread Peter Jaeger
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;

Re: [Rd] Parsing code with newlines

2008-08-04 Thread Duncan Murdoch
On 04/08/2008 8:50 AM, Peter Jaeger wrote: 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,

Re: [Rd] Parsing code with newlines

2008-08-04 Thread Prof Brian Ripley
This adds nothing to your previous post: please don't be annoying and post almost identical messages. I strongly suspect you mean 'parse error' and 'how can I parse R code', but we don't know what the example was and what the error message was. Nor do we know what you are doing with this

Re: [Rd] Parsing code with newlines

2008-08-04 Thread Jeffrey Horner
Duncan Murdoch wrote on 08/04/2008 08:11 AM: On 04/08/2008 8:50 AM, Peter Jaeger wrote: 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: