Displaying 1 result from an estimated 1 matches for "3d'complete".
2007 Sep 20
1
Bug with Cor(..., method='spearman") and by() (PR#9921)
...ted this on R help, and a few others responded indicating they too
were able to replicate the error as a function of missing data. I
believe this should not be the case and hence and reporting it here.
### Code provided on R-Help by Ivar Herfindal
# Simulate data
testdata <- cbind.data.frame(gr=3Drep(letters[1:4], each=3D5), =
aa=3Drnorm(20),
bb=3Drnorm(20))
# Introduce some missingness
testdata[1:5, 2] <- NA
# This works fine
by(testdata[,c("aa", "bb")], testdata$gr, cor, use=3D"complete",
method=3D"pearson")
# This induces error
by(testdata[,c(&...