Spencer Graves
2022-Jun-26 19:31 UTC
[Rd] lm(difftime~1) works but summary(lm(difftime~1)) throws an error
Hello, All: Consider the following: > dates123 <- as.Date('2022-01-01')+rep(1:3, 1:3) > d_dates123 <- diff(dates123, units='days') > fit123 <- lm(d_dates123~1) > summary(fit123) Error in Ops.difftime((f - mean(f)), 2) : '^' not defined for "difftime" objects I can get around it: fit123. <- lm(as.numeric(d_dates123)~1) summary(fit123.) However, I felt a need to report this anomaly. Thanks for all you do to make it easier for peasants to do statistics. Spencer Graves