Re: [Rd] Possible bug in termplot function (stats package) ?

From: peter dalgaard <pdalgd_at_gmail.com>
Date: Mon, 06 Jun 2011 21:15:25 +0200

On Jun 6, 2011, at 20:38 , Joris Meys wrote:

> On Mon, Jun 6, 2011 at 6:29 PM, peter dalgaard <pdalgd@gmail.com> wrote:

>> 
>> On Jun 6, 2011, at 17:15 , Joris Meys wrote:
>> 

> **snip**
>>> If nothing is found, an error is returned. If
>>> anything is found, data won't be NULL, so line 20, when reached, will
>>> always return FALSE. Can it be that lines 18 and 19 should be removed
>>> from the function?
>> 
>> 
>> I think this is a false assumption. What keeps model$call$data from being NULL?
>> 

> Apart from a dataframe that is explicitly assigned NULL, I can't
> imagine a case where model$call$data would be NULL. If it's not found,
> the statement returns an error. If it is found and it is NULL, your
> model call will have thrown an error earlier, so you won't even have
> an object to plot. If you can give me one example where that code
> actually makes sense, I'll be very happy. But right now, it doesn't
> make any sense at all to me.

I'd say that the burden of proof is really on your side, but how hard can it be:

> x <- 1:10
> y <- rnorm(10)
> m <- lm(y~x)
> m$call

lm(formula = y ~ x)

> m$call$data

NULL

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes_at_cbs.dk  Priv: PDalgd_at_gmail.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 06 Jun 2011 - 19:18:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 06 Jun 2011 - 20:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive