Ah, yes. Much better -- that is what match.call() is for.
As always, thanks for the insight,
Best,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll
On Wed, Jun 18
On 18/06/2014 15:01, Bert Gunter wrote:
Would
f <- function (...)
{
sapply(substitute(list(...)),deparse)[-1]
}
f(a1=log(1:4), m1=1:4, c1=pi)
a1 m1 c1
"log(1:4)" "1:4" "pi"
be equivalent?
I find the substitute(...()) construction completely mysterious,
Would
f <- function (...)
{
sapply(substitute(list(...)),deparse)[-1]
}
> f(a1=log(1:4), m1=1:4, c1=pi)
a1 m1 c1
"log(1:4)" "1:4" "pi"
be equivalent?
I find the substitute(...()) construction completely mysterious, while
substitute(list(...)) makes sense to m
On 18/06/2014 12:54, Jim Lemon wrote:
On Wed, 18 Jun 2014 04:24:58 PM yzh lin wrote:
Hi, every R user,
I wanna output names of objects, I googled codes from website,
but it
was not what I wanted.
the codes are as following:
f <- function (...)
{
unevaluatedArgs <- substitute(...())
On Wed, 18 Jun 2014 04:24:58 PM yzh lin wrote:
> Hi, every R user,
>
>I wanna output names of objects, I googled codes from website,
but it
> was not what I wanted.
>
> the codes are as following:
>
> f <- function (...)
> {
> unevaluatedArgs <- substitute(...())
> evaluatedArgs <- lis
Hi, every R user,
I wanna output names of objects, I googled codes from website, but it
was not what I wanted.
the codes are as following:
f <- function (...)
{
unevaluatedArgs <- substitute(...())
evaluatedArgs <- list(...)
stopifnot(length(unevaluatedArgs) == length(evaluatedArgs))
6 matches
Mail list logo