Running ‘panel.R’
  Running ‘rq.R’
  Running ‘rq.fit.panel.R’
  Running ‘run-demos.R’ [13s/16s]
Running the tests in ‘tests/run-demos.R’ failed.
Complete output:
  > library(quantreg)
  Loading required package: SparseM
  
  Attaching package: 'SparseM'
  
  The following object is masked from 'package:base':
  
      backsolve
  
  > 
  > (dDIR <- system.file("demo", package = "quantreg"))
  [1] "/data/gannet/ripley/R/packages/tests-clang/quantreg.Rcheck/quantreg/demo"
  > setwd(dDIR)
  > set.seed(1) # since some demos randomly generate
  > 
  > cat("Running demos from package 'quantreg' : \n\n")
  Running demos from package 'quantreg' : 
  
  > for(ff in list.files(dDIR, pattern="\\.R$", full.names = TRUE)) {
  +    f <- basename(ff)
  +    cat("\n", f," :\n", paste(rep.int("-", nchar(f)), collapse=''),
  +        "\n", sep='')
  + 
  +    source(ff, echo = TRUE)
  + }
  
  Frank.R :
  -------
  
  > vFrank <- function(x, df, delta, u) -log(1 - (1 - 
  +     exp(-delta))/(1 + exp(-delta * pt(x, df)) * ((1/u) - 1)))/delta
  
  > FrankModel <- function(x, delta, mu, sigma, df, tau) {
  +     z <- qt(vFrank(x, df, delta, u = tau), df)
  +     mu + sigma * z
  + }
  
  > n <- 200
  
  > df <- 8
  
  > delta <- 8
  
  > set.seed(1989)
  
  > x <- sort(rt(n, df))
  
  > v <- vFrank(x, df, delta, u = runif(n))
  
  > y <- qt(v, df)
  
  > plot(x, y, pch = "o", col = "blue", cex = 0.25)
  
  > Dat <- data.frame(x = x, y = y)
  
  > us <- c(0.25, 0.5, 0.75)
  
  > for (i in 1:length(us)) {
  +     v <- vFrank(x, df, delta, u = us[i])
  +     lines(x, qt(v, df))
  + }
  
  > cfMat <- matrix(0, 3, length(us))
  
  > trace <- TRUE
  
  > trace <- FALSE
  
  > for (i in 1:length(us)) {
  +     tau <- us[i]
  +     cat("tau = ", format(tau), ".. ")
  +     fit <- nlrq(y ~ FrankModel(x, delta, mu, sigma, df = 8, t .... [TRUNCATED] 
  tau =  0.25 .. 
  tau =  0.5 .. 
  tau =  0.75 .. 
  
  > colnames(cfMat) <- names(coef(fit))
  
  > cfMat
          delta          mu     sigma
  [1,] 14.87046 -0.20527840 0.9134834
  [2,] 16.35066  0.03312695 0.9626457
  [3,] 12.04705  0.11612377 0.9460523
  
  KMvCRQ.R :
  --------
  
  > require(quantreg)
  
  > require(survival)
  Loading required package: survival
  
  Attaching package: 'survival'
  
  The following object is masked from 'package:quantreg':
  
      untangle.specials
  
  
  > n <- 100
  
  > y <- rchisq(n, 3)
  
  > c <- rchisq(n, 5)
  
  > Y <- pmin(y, c)
  
  > d <- (y < c)
  
  > plot(survfit(Surv(Y, d) ~ 1))
  
  > f <- crq(Surv(Y, d) ~ 1, method = "Portnoy", grid = "pivot")
  
  > x <- f$sol[2, ]
  
  > p <- 1 - f$sol[1, ]
  
  > p <- c(p, p[length(p)])
  
  > par(col = "red")
  
  > fs <- plot(stepfun(x, p), do.points = FALSE, add = TRUE)
  
  Mammals.R :
  ---------
  
  > require(quantreg)
  
  > data(Mammals)
  
  > attach(Mammals)
  
  > x <- log(weight)
  
  > xx <- unique(x[order(x)])
  
  > y <- log(speed)
  
  > plot(x, y, xlab = "Weight in log(Kg)", ylab = "Speed in log(Km/hour)", 
  +     type = "n")
  
  > points(x[hoppers], y[hoppers], pch = "h", col = "red")
  
  > points(x[specials], y[specials], pch = "s", col = "blue")
  
  > others <- (!hoppers & !specials)
  
  > points(x[others], y[others], col = "black", cex = 0.75)
  
  > taus <- c(0.5, 0.9)
  
  > for (i in 1:length(taus)) {
  +     fit <- rqss(y ~ qss(x, lambda = 1, constraint = "C"), tau = taus[i])
  +     plot(fit, title = "Running Speed of Mam ..." ... [TRUNCATED] 
  
  > legend(4, 2, c("Median", "0.9 Quantile"), lty = 1, 
  +     col = 1:2, lwd = 1.5)
  
  > plot(fit, title = "Running Speed of Mammals", band = "both", 
  +     col = i, lwd = 1.5)
  Error in .local(x, nrow, ncol) : 
    diag method for class matrix.csr doesn't understand nrow and ncol args
  Calls: source ... summary -> summary -> summary.rqss -> diag -> diag -> .local
  Execution halted