Christian Hoffmann <christian.hoffmann <at> wsl.ch> writes:

> ggrothendieck <at> myway.com
> -----------------------
> data(longley)
> lm( longley[,7] ~. , data = longley[,-7] )
> 
> You cannot call data() inside a function:

To call data() within a function:

f <- function() {
       data(longley, envir = environment())
       lm( longley[,7] ~. , data = longley[,-7] )
}

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to