From leydold at statmath.wu.ac.at  Sun May 23 16:14:55 2010
From: leydold at statmath.wu.ac.at (Josef Leydold)
Date: Sun, 23 May 2010 16:14:55 +0200
Subject: [Rd] possible bug in formals
In-Reply-To: <mailman.13.1251540004.31955.r-devel@r-project.org>
References: <mailman.13.1251540004.31955.r-devel@r-project.org>
Message-ID: <20100523141455.GA17210@zwirn.stat-math.wu.ac.at>

Hi,

I am a little bit surprised by the following output of
'formals'. Is this the intended behavior?

> f <- function(a=1,b=-1) { a+b }
> class(formals(f)$a)
[1] "numeric"
> class(formals(f)$b)
[1] "call"


Josef


-- 


-----------------------------------------------------------------------------
Josef Leydold   |  WU (Vienna University of Economics and Business)
                |  Institute for Statistics and Mathematics
-----------------------------------------------------------------------------
Augasse 2-6     |  Tel.   +43 1 31336 4695
A-1090 Vienna   |  FAX    +43 1 31336 774
European Union  |  email  josef.leydold at wu.ac.at



[Rd] possible bug in formals
Josef Leydold