[R] Evaluating args in a function
Sandy Weisberg
sandy at stat.umn.edu
Wed Sep 12 18:48:30 CEST 2007
Can anyone explain what I'm doing wrong here:
> fred <- data.frame()
> class(fred)
[1] "data.frame"
> test.fn <- function(x,class=class(x)) {class}
> test.fn(fred)
Error in test.fn(fred) : promise already under evaluation: recursive
default argument reference or earlier problems?
R 2.5.1 on both Windows and SUSE Linux.
--
Sanford Weisberg, sandy at stat.umn.edu
Office and mailing address:
University of Minnesota, School of Statistics
312 Ford Hall, 224 Church St. SE, Minneapolis, MN 55455
612-625-8355, FAX 612-624-8868
St. Paul office:
146 Classroom-Office Building, 612-625-8777
More information about the R-help
mailing list