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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: transfer
> ### Title: transfer for discrete data
> ### Aliases: transfer
> ### Keywords: data preprocessing
> 
> ### ** Examples
> 
> # Generating multivariate binary data from a 'random' graph
> data.sim <- bdgraph.sim( n = 12, p = 4, size = 4, type = "discrete", cut = 2 )
> r_data   <- data.sim $ data
> r_data
      [,1] [,2] [,3] [,4]
 [1,]    0    1    0    0
 [2,]    0    0    0    1
 [3,]    0    0    0    0
 [4,]    1    0    0    0
 [5,]    0    1    0    0
 [6,]    1    0    0    0
 [7,]    0    0    0    0
 [8,]    1    0    0    1
 [9,]    0    0    0    0
[10,]    0    1    1    1
[11,]    0    0    0    1
[12,]    0    0    0    1
>    
> # Transfer the data
> transfer( r_data )
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
BDgraph
 --- call from context --- 
transfer(r_data)
 --- call from argument --- 
if (class(r_data) == "sim") r_data <- r_data$data
 --- R stacktrace ---
where 1: transfer(r_data)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (r_data) 
{
    if (class(r_data) == "sim") 
        r_data <- r_data$data
    n = dim(r_data)[1]
    p = dim(r_data)[2]
    data = matrix(0, nrow = n, ncol = p + 1)
    size_unique_data = 0
    result = .C("transfer_data", as.integer(r_data), data = as.integer(data), 
        as.integer(n), as.integer(p), size_unique_data = as.integer(size_unique_data), 
        PACKAGE = "BDgraph")
    size_unique_data = result$size_unique_data
    label = colnames(r_data)
    if (is.null(label)) 
        label = 1:p
    data = matrix(result$data, n, p + 1, dimnames = list(NULL, 
        c(label, "ferq")))
    data = data[(1:size_unique_data), ]
    return(data)
}
<bytecode: 0x55e23debf5f0>
<environment: namespace:BDgraph>
 --- function search by body ---
Function transfer in namespace BDgraph has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1