[Rd] incorrect behaviour of formals (PR#4511)
polzehl at wias-berlin.de
polzehl at wias-berlin.de
Fri Oct 10 14:29:15 MEST 2003
Full_Name: Jörg Polzehl
Version: 1.8.0
OS: Windows XP
Submission from: (NULL) (62.141.176.1)
I encountered a problem when playing with the mle library and specifying
negative
starting values for the parameters.
The reason seems to be an incorrect behaviour of function formals:
glike<-function(a=1,b=1,c=1) a
> formals(glike)
$a
[1] 1
$b
[1] 1
$c
[1] 1
> unlist(formals(glike))
a b c
1 1 1
> glike<-function(a=1,b=1,c= -1) a
> formals(glike)
$a
[1] 1
$b
[1] 1
$c
-1
> unlist(formals(glike))
$a
[1] 1
$b
[1] 1
$c
-1
Regards,
Jörg Polzehl
PS: The same happens in version 1.7.1
More information about the R-devel
mailing list