The R Project SVN R

Rev

Rev 88200 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 88200 Rev 89120
Line 183... Line 183...
183
## IGNORE_RDIFF_END
183
## IGNORE_RDIFF_END
184
 
184
 
185
 
185
 
186
## PR#18541 by Mikael Jagan -- chol()  error & warning message:
186
## PR#18541 by Mikael Jagan -- chol()  error & warning message:
187
x <- diag(-1, 5L)
187
x <- diag(-1, 5L)
188
(chF <- tryCmsg(chol(x, pivot = FALSE))) # dpotrf
188
(chF <- tryCmsg(chol(x, pivot = FALSE))) # dpotrf - warning
189
(chT <- withCallingHandlers(warning = function(w) ..W <<- conditionMessage(w),
189
chT <- withCallingHandlers(warning = function(w) ..W <<- conditionMessage(w),
190
                chol(x, pivot = TRUE ))) # dpstrf
190
                chol(x, pivot = TRUE )) # dpstrf  - warning
-
 
191
## IGNORE_RDIFF_BEGIN
-
 
192
chT  # matrix typically == x + pivot and rank (checked below)
-
 
193
## IGNORE_RDIFF_END
191
stopifnot(exprs = {
194
stopifnot(exprs = {
192
    grepl(" minor .* not positive$", chF) # was "not positive *definite*
195
    grepl(" minor .* not positive$", chF) # was "not positive *definite*
193
    grepl("rank-deficient or not positive definite$", ..W) # was "indefinite*
196
    grepl("rank-deficient or not positive definite$", ..W) # was "indefinite*
194
    ## platform dependent, Mac has several NaN's  chT == -diag(5)
197
    ## platform dependent, Mac has several NaN's  chT == -diag(5)
-
 
198
   identical(
-
 
199
    attr(chT, "pivot"), 1:5)
195
    attr(chT, "rank") %in% 0:1
200
    attr(chT, "rank") %in% 0:1
196
})
201
})