[Rd] update fails after specific sequence of steps (PR#474)
Peter Dalgaard BSA
p.dalgaard@biostat.ku.dk
07 Mar 2000 15:43:39 +0100
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._