The R Project SVN R

Rev

Rev 63138 | Rev 63306 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 63138 Rev 63206
Line 71... Line 71...
71
try ( k3 <- kmeans(rr, 3, trace=2) ) ## Warning: Quick-Transfer.. steps exceed
71
try ( k3 <- kmeans(rr, 3, trace=2) ) ## Warning: Quick-Transfer.. steps exceed
72
try ( k. <- kmeans(r., 3) ) # after rounding, have only two distinct points
72
try ( k. <- kmeans(r., 3) ) # after rounding, have only two distinct points
73
      k. <- kmeans(r., 2)   # fine
73
      k. <- kmeans(r., 2)   # fine
74
 
74
 
75
 
75
 
-
 
76
## regression test incorrectly in example(NA)
-
 
77
xx <- c(0:4)
-
 
78
is.na(xx) <- c(2, 4)
-
 
79
LL <- list(1:5, c(NA, 5:8), c("A","NA"), c("a", NA_character_))
-
 
80
L2 <- LL[c(1,3)]
-
 
81
dN <- dd <- USJudgeRatings; dN[3,6] <- NA
-
 
82
stopifnot(anyNA(xx), anyNA(LL), !anyNA(L2),
-
 
83
          anyNA(dN), !anyNA(dd), !any(is.na(dd)),
-
 
84
          all(c(3,6) == which(is.na(dN), arr.ind=TRUE)))
-
 
85
 
-
 
86
 
76
proc.time()
87
proc.time()