[R] Backquote in R syntax
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 7 11:36:49 CEST 2006
?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
More information about the R-help
mailing list