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

> ### Name: fusedest_normal
> ### Title: The block splitting algorithm for linear regression estimation
> ###   with the fused group lasso penalty function
> ### Aliases: fusedest_normal
> 
> ### ** Examples
> 
> 
> library(fusedest)
> library(igraph)

Attaching package: ‘igraph’

The following objects are masked from ‘package:stats’:

    decompose, spectrum

The following object is masked from ‘package:base’:

    union

> 
> ####### Functions for data generation #########
> 
> 
> generating_normal_data <- function(beta.true, N, m, sigma2.y){
+ 
+   p <- dim(beta.true)[2]
+   M <- dim(beta.true)[1]
+ 
+   label.list <- sample(c(1:M), m, replace = TRUE)
+   n.list <- rpois(m, N)
+   X <- matrix(rnorm(sum(n.list)*p, 0, 1), nrow = sum(n.list), ncol = p)
+ 
+   ind.strt <- c(1, cumsum(n.list[1:(m-1)])+1)
+   ind.end <- cumsum(n.list)
+   label.dc <- rep(c(1:m), n.list)
+ 
+   y <- as.numeric(unlist(sapply(c(1:m),
+         function(i){
+           X[ind.strt[i]:ind.end[i],]%*%as.numeric(beta.true[label.list[i],]) +
+           rnorm(n.list[i], 0, sqrt(sigma2.y))
+           })))
+ 
+   label.true <- rep(label.list, n.list)
+ 
+   results <- list(X, y, n.list, label.dc, label.true)
+   names(results) <- c("X", "y", "n.list", "label.dc", "label.true")
+   return(results)
+ }
> 
> generatingEdgelistID03 <- function(m, deg){
+ 
+   c1 <- NULL
+   c2 <- NULL
+ 
+   if(deg < m-deg){
+ 
+     c1 <- rep(0, (m-deg)*deg)
+     c2 <- rep(0, (m-deg)*deg)
+ 
+     for(i in 1:(m-deg)){
+ 
+       ind.i <- c(((i-1)*deg+1):(i*deg))
+ 
+       c1[ind.i] <- rep(i, deg)
+       c2[ind.i] <- c((i+1):(i+deg))
+     }
+ 
+     if(deg > 1){
+       c3 <- rep(0, deg*(deg-1)/2)
+       c4 <- rep(0, deg*(deg-1)/2)
+       l <- 0
+       for(i in (m-deg+1):(m-1)){
+ 
+         c3[c((l+1):(l+m-i))] <- rep(i, m-i)
+         c4[c((l+1):(l+m-i))] <- c((i+1):m)
+         l <- l + (m-i)
+       }
+ 
+     }
+   }
+ 
+   return(cbind(c(c1,c3),c(c2,c4)))
+ }
> 
> 
> 
> RcppInvGram <- function(X, w, lambda) {
+     .Call('_fusedest_RcppInvGram', PACKAGE = 'fusedest', X, w, lambda)
+ }
> 
> RcppXtwy <- function(X, y, w) {
+     .Call('_fusedest_RcppXtwy', PACKAGE = 'fusedest', X, y, w)
+ }
> 
> RcppWolsSolver03 <- function(invXtwX, Xtwy, b) {
+     .Call('_fusedest_RcppWolsSolver03', PACKAGE = 'fusedest', invXtwX, Xtwy, b)
+ }
> 
> 
> 
> ############ Setting true parameters ##########
> 
> p.star <- 10
> 
> beta.true <- t(matrix(
+   c(rep(c(-2,2), p.star),
+     rep(c(2,-2), p.star),
+     c(rep(2, p.star),rep(-2,5)),
+     c(rep(-2,p.star),rep(2,5)),
+     rep(c(-1,3), p.star)), nrow = p.star, ncol = 5
+ ))
Error in matrix(c(rep(c(-2, 2), p.star), rep(c(2, -2), p.star), c(rep(2,  : 
  data length differs from size of matrix: [90 != 10 x 5]
Calls: t -> matrix
Execution halted