Re: [Rd] data.frame within a function (PR#9294) (cont'd)

2006-11-30 Thread Prof Brian Ripley
This is not to do with your subject line, and not a bug (and PR#9294 as been closed). You don't even say what you think the 'issue' is: it seems to be your lack of understanding of the scope rules. I get > f2() ok Error in inherits(x, "data.frame") : object "dtf" not found which is quite corr

[Rd] data.frame within a function (PR#9294) (cont'd)

2006-11-29 Thread Riyan Cheng
This continues the message "data.frame within a function (PR#9294)" that was posted on 2006/10/12. Duncan Murdoch kindly replied. I'm using the current version R 2.4.0, but the same issue exists. Just copy and paste the following code under R, and compare the output of f1() and f2() and the out

Re: [Rd] data.frame within a function (PR#9294)

2006-10-12 Thread Duncan Murdoch
On 10/12/2006 1:45 PM, [EMAIL PROTECTED] wrote: > Full_Name: Riyan Cheng > Version: windows 2.0.1 This version is really quite ancient. The current release is 2.4.0. > OS: windows xp > Submission from: (NULL) (74.140.105.186) > > > > If one runs the following function ff(), an error would occ

[Rd] data.frame within a function (PR#9294)

2006-10-12 Thread rcheng
Full_Name: Riyan Cheng Version: windows 2.0.1 OS: windows xp Submission from: (NULL) (74.140.105.186) If one runs the following function ff(), an error would occur regarding data.frame(): ff<- function(){ x<- rnorm(10) y<- rnorm(10) lm1<- lm(y~1,data=data.frame(y=y,x=x)); cat("o