[Rd] bug in prcomp (PR#8994)
KjetilBrinchmannHalvorsen at gmail.com
KjetilBrinchmannHalvorsen at gmail.com
Fri Jun 16 22:23:00 CEST 2006
The following seems to be an bug in prcomp():
> test <- ts( matrix( c(NA, 2:5, NA, 7:10), 5, 2))
> test
Time Series:
Start = 1
End = 5
Frequency = 1
Series 1 Series 2
1 NA NA
2 2 7
3 3 8
4 4 9
5 5 10
> prcomp(test, scale.=TRUE, na.action=na.omit)
Erro en svd(x, nu = 0) : infinite or missing values in 'x'
> prcomp(na.omit(test), scale.=TRUE, na.action=na.omit)
Standard deviations:
[1] 1.414214e+00 3.726778e-17
Rotation:
PC1 PC2
Series 1 0.7071068 -0.7071068
Series 2 0.7071068 0.7071068
>
note that
> is.matrix(test)
[1] TRUE
This is R2.3.1 pre-compiled binary from CRAN on windows XP.
> sessionInfo()
Version 2.3.1 (2006-06-01)
i386-pc-mingw32
attached base packages:
[1] "methods" "stats" "graphics" "grDevices" "utils"
"datasets" "base"
Kjetil
More information about the R-devel
mailing list