From joshmobrien at gmail.com  Thu Oct  4 08:21:44 2012
From: joshmobrien at gmail.com (Josh O'Brien)
Date: Wed, 3 Oct 2012 23:21:44 -0700 (PDT)
Subject: [Rd] How to build a list with missing values? What is missing,
 anyway?
In-Reply-To: <CAJoaRhb8gq79aB3EXPeMa+n6eK6pj9NTFHFBJRUbP_=S1bbTaA@mail.gmail.com>
References: <CAJoaRhb8gq79aB3EXPeMa+n6eK6pj9NTFHFBJRUbP_=S1bbTaA@mail.gmail.com>
Message-ID: <1349331704206-4644965.post@n4.nabble.com>


>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)

- Josh



--
View this message in context: http://r.789695.n4.nabble.com/How-to-build-a-list-with-missing-values-What-is-missing-anyway-tp4644957p4644965.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] How to build a list with missing values? What is missing, anyway?
Josh O'Brien