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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cont2cat
> ### Title: Stratification and categorization of continuous data
> ### Aliases: breakPoints cont2cat stratify
> 
> ### ** Examples
> 
> 
> ## Compute the break points of marginal strata
> x <- data.frame(x = round(rnorm(10), 1), y = round(rlnorm(10), 1))
> x <- breakPoints(x = x, n = 4, type = "area", prop = TRUE)
> x
$breaks
$breaks$x
[1] -0.8  0.2  0.6  1.6

$breaks$y
[1] 0.1 0.5 1.5 2.6 4.5


$prop
$prop$x
[1] 0.5 0.3 0.2

$prop$y
[1] 0.2 0.3 0.3 0.2


> 
> ## Convert continuous data into categorical data
> # Matrix
> x <- y <- c(1:10)
> x <- cbind(x, y)
> breaks <- list(c(1, 2, 4, 8, 10), c(1, 5, 10))
> y <- cont2cat(x, breaks)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
pedometrics
 --- call from context --- 
cont2cat(x, breaks)
 --- call from argument --- 
if (x_cl == "matrix") x <- as.matrix(x)
 --- R stacktrace ---
where 1: cont2cat(x, breaks)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (x, breaks, integer = FALSE) 
{
    if (!requireNamespace("SpatialTools", quietly = TRUE)) {
        stop(paste("Package 'SpatialTools' needed for this function to work. ", 
            "Please install it.", sep = ""), call. = FALSE)
    }
    x_cl <- class(x)
    x <- as.data.frame(x)
    n_col <- ncol(x)
    if (n_col == 1) 
        breaks <- list(breaks)
    for (i in 1:n_col) {
        r <- range(x[, i], na.rm = TRUE)
        if (r[1] < min(breaks[[i]])) 
            breaks[[i]] <- c(r[1], breaks[[i]])
        if (r[2] > max(breaks[[i]])) 
            breaks[[i]] <- c(breaks[[i]], r[2])
        x[, i] <- cut(x = x[, i], breaks = breaks[[i]], include.lowest = TRUE, 
            right = FALSE)
    }
    if (integer) 
        x <- sapply(x, as.integer)
    if (n_col == 1) 
        x <- as.vector(x)
    if (x_cl == "matrix") 
        x <- as.matrix(x)
    return(x)
}
<bytecode: 0x55cc47a7f428>
<environment: namespace:pedometrics>
 --- function search by body ---
Function cont2cat in namespace pedometrics has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1