[Rd] summary.lm fails for difftime objects
Gabor Grothendieck
ggrothend|eck @end|ng |rom gm@||@com
Sat Feb 18 15:07:15 CET 2023
lm works with difftime objects but then if you try to get the summary
it fails with an error:
fit <- lm(as.difftime(Time, units = "mins") ~ demand, BOD)
summary(fit)
## Error in Ops.difftime((f - mean(f)), 2) :
## '^' not defined for "difftime" objects
A number of other lm methods also fail, e.g. plot(fit), but others
work, e.g. coef(fit), resid(fit)
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
More information about the R-devel
mailing list