[R] Error when using cobs library

Martin Maechler maechler at stat.math.ethz.ch
Sat Nov 4 10:59:16 CET 2006


>>>>> "jacinthe" == jacinthe  <jacinthe at gmx.de>
>>>>>     on Sat, 04 Nov 2006 10:06:10 +0100 writes:

    jacinthe> Dear R-Users, I have problems with the cobs
    jacinthe> library.
	      ^^^^^^^
	      It's package!
	      It's package!
	      .............
	      [say it load five times, so you re-train your brain ]

    jacinthe> When doing the cobs example, I get the
    jacinthe> folling error message:

    jacinthe> example(cobs)

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

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

    cobs> con <- rbind(c(1, min(x), 0), c(-1, max(x), 1), c(0,
    jacinthe>     0, 0.5))

    cobs> Rbs <- cobs(x, y, constraint = "increase", pointwise = con)
    cobs> 
       > qbsks2(): Performing general knot selection ...

    jacinthe> Error in as.matrix.csr(new("matrix.coo", ra =
    jacinthe> c(z1$design), ia = i1, ja = j1, : unable to find a
    jacinthe> non-generic version of function "as.matrix.csr"

Of course, the above works "typically", since otherwise the
package would not be on CRAN.

    jacinthe> Any suggestions how to fix this problem?

It's not easy to help you, since you didn't give any details
about your setup.
Please do so, e.g. by showing the result of sessionInfo().

I guess a mismatch of versions of the packages involved,
notably your version of "SparseM" maybe outdated.

    jacinthe> Thank you for your help.

you're welcome.
Martin Maechler, ETH Zurich



More information about the R-help mailing list