Hi Folks, Can someone satisfy my curiosity (well, at least about the following query!) Reading the draft proofs of an article I've been asked to look through, I find the typesetter has set what would normally be entered as source("xyz.R") or source('xyz.R') as source(`xyz.R') i.e. it has come out with an opening backquote, then xyz.R, then a closing forward quote. I suspect the intervention of "intelligent" software (? la Word's "clever quotes"). Well, the cure is clear and I'm not asking about that. But I got curious about what role the backquote might play in R syntax (if any). As a start I tried typing that in as it stands: source(`xyz.R') ## and then you get the "continuation +" as if it were ## incomplete, so I tried a closing parenthesis: + ) Error: unprotect_ptr: pointer not found So it wasn't a mere syntax error (which would have caused an error message saying just that) -- using the backquote caused R to try to do something. So now I'm wondering what the effect of "`" is, in R. Statutory Declaration: I have performed an R Site Search for "backquote" obtaining 9 hits none of which seems to address this question. Best wishes to all, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 07-Aug-06 Time: 10:25:31 ------------------------------ XFMail ------------------------------
?Quote tells you all about quotes in R (and so does ?backquote in R-devel, but many people call it backtick and that is all 2.3.1 has). On Mon, 7 Aug 2006, Ted.Harding at nessie.mcc.ac.uk wrote:> Hi Folks, > Can someone satisfy my curiosity (well, at least about > the following query!) > > Reading the draft proofs of an article I've been asked > to look through, I find the typesetter has set what > would normally be entered as > > source("xyz.R") or source('xyz.R') > > as > > source(`xyz.R') > > i.e. it has come out with an opening backquote, then > xyz.R, then a closing forward quote. I suspect the > intervention of "intelligent" software (? la Word's > "clever quotes"). > > Well, the cure is clear and I'm not asking about that. > But I got curious about what role the backquote might > play in R syntax (if any). As a start I tried typing > that in as it stands: > > source(`xyz.R') > ## and then you get the "continuation +" as if it were > ## incomplete, so I tried a closing parenthesis: > + ) > Error: unprotect_ptr: pointer not found > > So it wasn't a mere syntax error (which would have caused > an error message saying just that) -- using the backquote > caused R to try to do something. > > So now I'm wondering what the effect of "`" is, in R. > > Statutory Declaration: I have performed an R Site Search > for "backquote" obtaining 9 hits none of which seems to > address this question. > > Best wishes to all, > Ted. > > -------------------------------------------------------------------- > E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> > Fax-to-email: +44 (0)870 094 0861 > Date: 07-Aug-06 Time: 10:25:31 > ------------------------------ XFMail ------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
(Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> writes:> Hi Folks, > Can someone satisfy my curiosity (well, at least about > the following query!) > > Reading the draft proofs of an article I've been asked > to look through, I find the typesetter has set what > would normally be entered as > > source("xyz.R") or source('xyz.R') > > as > > source(`xyz.R') > > i.e. it has come out with an opening backquote, then > xyz.R, then a closing forward quote. I suspect the > intervention of "intelligent" software (? la Word's > "clever quotes"). > > Well, the cure is clear and I'm not asking about that. > But I got curious about what role the backquote might > play in R syntax (if any). As a start I tried typing > that in as it stands: > > source(`xyz.R') > ## and then you get the "continuation +" as if it were > ## incomplete, so I tried a closing parenthesis: > + ) > Error: unprotect_ptr: pointer not found > > So it wasn't a mere syntax error (which would have caused > an error message saying just that) -- using the backquote > caused R to try to do something. > > So now I'm wondering what the effect of "`" is, in R. > > Statutory Declaration: I have performed an R Site Search > for "backquote" obtaining 9 hits none of which seems to > address this question.?Quotes should put you straight. (And help.search("`") gets you there, as does help.search("backtick"), although not help.search("back quote")) -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Reasonably Related Threads
- model.matrix.default chokes on backquote (PR#7202)
- Stubbing Kernel.` (backquote)
- [klibc:update-dash] dash: expand: Fix trailing newlines processing in backquote expanding
- [klibc:update-dash] parser: Fix backquote support in here-document EOF mark
- [klibc:update-dash] dash: parser: Fix backquote support in here-document EOF mark