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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: BD_relative
> ### Title: Relative Band Depth of functions in a univariate functional
> ###   dataset
> ### Aliases: BD_relative BD_relative.fData BD_relative.default
> 
> ### ** Examples
> 
> 
> grid = seq( 0, 1, length.out = 1e2 )
> 
> Data_ref = matrix( c( 0  + sin( 2 * pi * grid ),
+                       1  + sin( 2 * pi * grid ),
+                       -1 + sin( 2 * pi * grid ) ),
+                    nrow = 3, ncol = length( grid ), byrow = TRUE )
> 
> Data_test_1 = matrix( c( 0.6 + sin( 2 * pi * grid ) ),
+                       nrow = 1, ncol = length( grid ), byrow = TRUE )
> 
> Data_test_2 = matrix( c( 0.6 + sin( 2 * pi * grid ) ),
+                       nrow = length( grid ), ncol = 1, byrow = TRUE )
> 
> Data_test_3 = 0.6 + sin( 2 * pi * grid )
> 
> Data_test_4 = array( 0.6 + sin( 2 * pi * grid ), dim = length( grid ) )
> 
> Data_test_5 = array( 0.6 + sin( 2 * pi * grid ), dim = c( 1, length( grid ) ) )
> 
> Data_test_6 = array( 0.6 + sin( 2 * pi * grid ), dim = c( length( grid ), 1 ) )
> 
> Data_test_7 = matrix( c( 0.5  + sin( 2 * pi * grid ),
+                          -0.5 + sin( 2 * pi * grid ),
+                          1.1 + sin( 2 * pi * grid ) ),
+                       nrow = 3, ncol = length( grid ), byrow = TRUE )
> 
> fD_ref = fData( grid, Data_ref )
> fD_test_1 = fData( grid, Data_test_1 )
> fD_test_2 = fData( grid, Data_test_2 )
> fD_test_3 = fData( grid, Data_test_3 )
> fD_test_4 = fData( grid, Data_test_4 )
> fD_test_5 = fData( grid, Data_test_5 )
> fD_test_6 = fData( grid, Data_test_6 )
> fD_test_7 = fData( grid, Data_test_7 )
> 
> BD_relative( fD_test_1, fD_ref )
[1] 0.6666667
> BD_relative( Data_test_1, Data_ref )
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
roahd
 --- call from context --- 
BD_relative(Data_test_1, Data_ref)
 --- call from argument --- 
if (class(Data_target) != class(Data_reference)) {
    if (!(class(Data_target) %in% c("numeric", "array", "matrix") & 
        class(Data_reference) %in% c("numeric", "array", "matrix"))) {
        stop("Error in BD_relative: you have to provide target and reference data\n          with the same class")
    }
}
 --- R stacktrace ---
where 1: BD_relative(Data_test_1, Data_ref)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (Data_target, Data_reference) 
{
    if (class(Data_target) != class(Data_reference)) {
        if (!(class(Data_target) %in% c("numeric", "array", "matrix") & 
            class(Data_reference) %in% c("numeric", "array", 
                "matrix"))) {
            stop("Error in BD_relative: you have to provide target and reference data\n          with the same class")
        }
    }
    UseMethod("BD_relative", Data_target)
}
<bytecode: 0x560814136c70>
<environment: namespace:roahd>
 --- function search by body ---
Function BD_relative in namespace roahd has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(Data_target) != class(Data_reference)) { : 
  the condition has length > 1
Calls: BD_relative
Execution halted