From p.dalgaard@biostat.ku.dk  Tue Mar  7 14:43:39 2000
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 07 Mar 2000 15:43:39 +0100
Subject: [Rd] update fails after specific sequence of steps (PR#474)
In-Reply-To: jfox@mcmaster.ca's message of "Tue, 7 Mar 2000 15:08:03 +0100 (MET)"
References: <200003071408.PAA18937@pubhealth.ku.dk>
Message-ID: <x2wvnekfhg.fsf@blueberry.kubism.ku.dk>


Strange things happen on Unix too. 

> source('fox.R')
> Moore<-read.table('Moore.txt')
> attach(Moore)
> mod.full<-lm(conform~status*fcategory)
> summary(mod.full)
...
> mod.m<-update(mod.full, ~.~-status:fcategory)
Error in model.frame.default(formula = ~conform ~ 1, drop.unused.levels = TRUE) : 
	object is not a matrix
> mod.m<-update(mod.full, .~.-status:fcategory) # works following summary and error
> mod.m

Call:
lm(formula = conform ~ status + fcategory)

Coefficients:
    (Intercept)        statuslow     fcategorylow  fcategorymedium  
       14.72356         -4.60667          0.08089         -1.09511  


#### Well you *thought* it worked, but watch: ####
> mod.full<-lm(conform~status*fcategory)
> summary(mod.full)

Call:
lm(formula = conform ~ L׀@ * fcategory)
                       ^^^^^^^

...and the attached dataframe is corrupted. Must investigate further.

> ls("Moore")
[1] "conform"   "fcategory" "fscore"    "L׀@"      "subject"  
                                         ^^^^^^^
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] update fails after specific sequence of steps (PR#474)
Peter Dalgaard BSA