Re: [Rd] How to build a list with missing values? What is missing, anyway?

From: Peter Meilstrup <peter.meilstrup_at_gmail.com>
Date: Thu, 04 Oct 2012 15:53:12 -0700

On Wed, Oct 3, 2012 at 11:21 PM, Josh O'Brien <joshmobrien_at_gmail.com> wrote:
>
>>Say I have argnames <- c("a", "b", "c").
> >From that I want to construct the equivalent of alist(a=, b=, c=).
>
> Here's a one liner that'll do that for you:
>
> argnames <- letters[1:3]
> setNames(rep(list(bquote()), length(argnames)), argnames)

Thanks.

Just so I have my mental model correct, I'm gathering that missing/`` is a symbol that the interpreter has a special rule for -- evaluating it raises an error, as opposed to objects that evaluate to themselves or variable names that evaluate to objects.

Does the same sort of thing explain the behavior of `...`? When the interpreter comes across `...` in the arguments during evaluation of a call, it trips a special argument-interpolating behavior?

Peter



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 04 Oct 2012 - 22:55:52 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 05 Oct 2012 - 12:00:47 GMT.

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

list of date sections of archive