Re: [Rd] data argument and environments

2009-04-12 Thread roger koenker
Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example in survival4. My problem seems to be that my lam variable is not part of the data frame d, and I don't know how to manipulate the environment for the formula so that it is found. T

Re: [Rd] data argument and environments

2009-04-12 Thread Duncan Murdoch
roger koenker wrote: Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example in survival4. My problem seems to be that my lam variable is not part of the data frame d, and I don't know how to manipulate the environment for the formula s

Re: [Rd] data argument and environments

2009-04-12 Thread Peter Dalgaard
roger koenker wrote: Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example in survival4. My problem seems to be that my lam variable is not part of the data frame d, and I don't know how to manipulate the environment for the formula so t

Re: [Rd] data argument and environments

2009-04-12 Thread roger koenker
Great, thanks again, Duncan. And to Peter. I've adopted the enclos = environment(formula) solution. Roger On Apr 12, 2009, at 2:29 PM, Duncan Murdoch wrote: roger koenker wrote: Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example

[Rd] Simple class with an automatic printing issue

2009-04-12 Thread Tom Short
I don't understand the following behavior for a simple S3 class. The auto-printing at the command line doesn't behave as I expect. I'm probably missing something, but it might be a bug. > print.testClass <- function(x, ...) cat("Class:", class(x), ":", x, "\n") > structure(1, class = "testClass")

Re: [Rd] Simple class with an automatic printing issue

2009-04-12 Thread William Dunlap
It may have to do with the results of is.object(): > is.object(1*structure(1,class="testClass")) [1] FALSE > is.object(structure(1,class="testClass")*1) [1] TRUE > is.object(structure(1,class="testClass")) [1] TRUE is.object(x) should be true if x has a class attribute, but 1*structut