Running examples in ‘cobs-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cobs-methods
> ### Title: Methods for COBS Objects
> ### Aliases: coef.cobs fitted.cobs knots.cobs print.cobs residuals.cobs
> ###   summary.cobs
> ### Keywords: print
> 
> ### ** Examples
> 
> example(cobs)

cobs> x <- seq(-1,3,,150)

cobs> y <- (f.true <- pnorm(2*x)) + rnorm(150)/10

cobs> ## specify pointwise constraints (boundary conditions)
cobs> con <- rbind(c( 1,min(x),0), # f(min(x)) >= 0
cobs+              c(-1,max(x),1), # f(max(x)) <= 1
cobs+              c(0,  0,   0.5))# f(0)      = 0.5

cobs> ## obtain the median  REGRESSION  B-spline using automatically selected knots
cobs> Rbs <- cobs(x,y, constraint= "increase", pointwise = con)
qbsks2():
 Performing general knot selection ...

 Deleting unnecessary knots ...
Warning in cobs(x, y, constraint = "increase", pointwise = con) :
  drqssbc2(): Not all flags are normal (== 1), ifl : 21

cobs> Rbs
COBS regression spline (degree = 2) from call:
	 cobs(x = x, y = y, constraint = "increase", pointwise = con)

 **** ERROR in algorithm: ifl = 21


{tau=0.5}-quantile;  dimensionality of fit: 5 from {5}
x$knots[1:4]: -1.0000040, -0.2214765,  1.3892617,  3.0000040

cobs> plot(Rbs, lwd = 2.5)

cobs> lines(spline(x, f.true), col = "gray40")

cobs> lines(predict(cobs(x,y)), col = "blue")
qbsks2():
 Performing general knot selection ...

 Deleting unnecessary knots ...
Warning in cobs(x, y) :
  drqssbc2(): Not all flags are normal (== 1), ifl : 21

cobs> mtext("cobs(x,y)   # completely unconstrained", 3, col= "blue")

cobs> ## compute the median  SMOOTHING  B-spline using automatically chosen lambda
cobs> Sbs <- cobs(x,y, constraint="increase", pointwise= con, lambda= -1)

 Searching for optimal lambda. This may take a while.
   While you are waiting, here is something you can consider
   to speed up the process:
       (a) Use a smaller number of knots;
       (b) Set lambda==0 to exclude the penalty term;
       (c) Use a coarser grid by reducing the argument
 	   'lambda.length' from the default value of 25.
Warning in min(sol1["k", i.keep]) :
  no non-missing arguments to min; returning Inf
Error in drqssbc2(x, y, w, pw = pw, knots = knots, degree = degree, Tlambda = if (select.lambda) lambdaSet else lambda,  : 
  The problem is degenerate for the range of lambda specified.
Calls: example ... source -> withVisible -> eval -> eval -> cobs -> drqssbc2
Execution halted