Re: [R] Backquote in R syntax

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 07 Aug 2006 - 19:36:49 EST

?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@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@nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 07-Aug-06 Time: 10:25:31
> ------------------------------ XFMail ------------------------------
>
> ______________________________________________
> R-help@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@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


______________________________________________ R-help@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.

Received on Mon Aug 07 20:50:17 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 07 Aug 2006 - 22:19:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.