Rev 12904 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
## PR 640 (diff.default computes an incorrect starting time)## By: Laimonis Kavalieris <lkavalieris@maths.otago.ac.nz>library(ts)y <- ts(rnorm(24), freq=12)x <- ts(rnorm(24), freq=12)arima0(y,xreg=x, seasonal=list(order=c(0,1,0)))## Comments:## PR 644 (crash using fisher.test on Windows)## By: Uwe Ligges <ligges@statistik.uni-dortmund.de>library(ctest)x <- matrix(c(2, 2, 4, 8, 6, 0, 1, 1, 7, 8, 1, 3, 1, 3, 7, 4, 2, 2, 2,1, 1, 0, 0, 0, 0, 0, 1, 1, 2, 0, 1, 1, 0, 2, 1, 0, 0, 0),nc = 2)fisher.test(x)## Comments: (wasn't just on Windows)## PR 653 (extrapolation in spline)## By: Ian White <imsw@holyrood.ed.ac.uk>x <- c(2,5,8,10)y <- c(1.2266,-1.7606,-0.5051,1.0390)fn <- splinefun(x, y, method="natural")xx1 <- fn(0:12)# should be the same if reflectedfn <- splinefun(rev(-x),rev(y),method="natural")xx2 <- fn(0:-12)stopifnot(all.equal(xx1, xx2))# should be the same as interpSplinelibrary(splines)xx3 <- predict(interpSpline(x, y), 0:12)stopifnot(all.equal(xx1, xx3$y))detach("package:splines")## Comments: all three differed in 1.2.1.## PR 698 (print problem with data frames)## actually, a subsetting problem with data framesfred <- data.frame(happy=c(TRUE, FALSE, TRUE), sad=7:9)z <- try(tmp <- fred[c(FALSE, FALSE, TRUE, TRUE)])stopifnot(class(z) == "try-error")## Comments: No error before 1.2.1## PR 753 (step can't find variables)##x <- data.frame(a=rnorm(10), b=rnorm(10), c=rnorm(10))x0.lm <- lm(a ~ 1, data=x)step(x0.lm, ~ b + c)## Comments:## PR 796 (aic in binomial models is often wrong)##data(esoph)a1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * alcgp,data = esoph, family = binomial())$aica1a2 <- glm(ncases/(ncases+ncontrols) ~ agegp + tobgp * alcgp,data = esoph, family = binomial(), weights=ncases+ncontrols)$aica2stopifnot(a1 == a2)## Comments:# both should be 236.9645## Follow up: example from Lindsey, purportedly of inaccuracy in aicy <- matrix(c(2, 0, 7, 3, 0, 9), ncol=2)x <- gl(3, 1)a <- glm(y ~ x, family=binomial)$aicstopifnot(is.finite(a))## Comments: gave NaN prior to 1.2.1## PR 802 (crash with scan(..., what=list(,,)))##m <- matrix(1:9, 3,3)write(m, "test.dat", 3)try(scan("test.dat", what=list(,,,)))unlink("test.dat")## Comments: segfaulted in 1.2.0## Jonathan Rougier, 2001-01-30 [bug in 1.2.1 and earlier]tmp <- array(list(3), c(2, 3))tmp[[2, 3]] <- "fred"all.equal(t(tmp), aperm(tmp))