Running examples in 'oceanmap-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cust.colorbar
> ### Title: defines colorbar settings for 'v.raster' and 'add.region'-calls.
> ### Aliases: cust.colorbar
> ### Keywords: internal
> 
> ### ** Examples
> 
> ## Example:
> path <- system.file("test_files", package="oceanmap")
> nfiles <- Sys.glob(paste0(path,'/herring*.nc')) # load sample-'.nc'-files
> head(nfiles)
[1] "/home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/oceanmap/test_files/herring_lavae.nc"
> rfile <- nc2raster(nfiles[1], varname='Conc', layer=1)
File /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/oceanmap/test_files/herring_lavae.nc (NC_FORMAT_CLASSIC):

     1 variables (excluding dimension variables):
        float Conc[lon,lat,time]   
            _FillValue: -1

     3 dimensions:
        lon  Size:352
        lat  Size:310
        time  Size:4   *** is unlimited ***
            units: seconds since 2006-03-01 00:00:00
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
oceanmap
 --- call from context --- 
matrix2raster(z, x = lon, y = lat)
 --- call from argument --- 
if (class(z) == "array") {
    cat("\nconverting array to RasterStack object")
    if (missing(layer)) 
        layer <- 1:dim(z)[3]
    h <- raster()
    for (ts in layer) {
        h.add <- raster(t(z[, , ts])[ncol(z):1, ])
        h <- raster::addLayer(h, h.add)
    }
} else {
    cat("\nconverting matrix to RasterLayer")
    h <- raster(t(z)[ncol(z):1, ])
}
 --- R stacktrace ---
where 1: matrix2raster(z, x = lon, y = lat)
where 2: nc2raster(nfiles[1], varname = "Conc", layer = 1)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (z, x, y, layer, proj = "+proj=longlat") 
{
    if (class(z) == "array") {
        cat("\nconverting array to RasterStack object")
        if (missing(layer)) 
            layer <- 1:dim(z)[3]
        h <- raster()
        for (ts in layer) {
            h.add <- raster(t(z[, , ts])[ncol(z):1, ])
            h <- raster::addLayer(h, h.add)
        }
    }
    else {
        cat("\nconverting matrix to RasterLayer")
        h <- raster(t(z)[ncol(z):1, ])
    }
    if (!missing(x) & !missing(y)) {
        raster::extent(h) <- raster::extent(c(range(x), range(y)))
    }
    else {
        warning("\nconverting without geographical coordinates!")
    }
    raster::projection(h) <- proj
    return(h)
}
<bytecode: 0x59d76f0>
<environment: namespace:oceanmap>
 --- function search by body ---
Function matrix2raster in namespace oceanmap has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(z) == "array") { : the condition has length > 1
Calls: nc2raster -> matrix2raster
Execution halted