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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hue
> ### Title: Hue color data
> ### Aliases: hue
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data(hue)
> summary(hue)
     H_mean               Method         Time            Fruit    
 Min.   : 82.12   Colorimeter:277   Min.   : 0.000   1      : 30  
 1st Qu.: 97.53   Scanner    :277   1st Qu.: 3.000   2      : 30  
 Median :105.55                     Median : 6.000   3      : 30  
 Mean   :104.08                     Mean   : 6.487   6      : 30  
 3rd Qu.:111.45                     3rd Qu.:10.000   10     : 30  
 Max.   :117.08                     Max.   :14.000   13     : 30  
                                                     (Other):374  
> str(hue)
'data.frame':	554 obs. of  4 variables:
 $ H_mean: num  117 115 117 116 116 ...
 $ Method: Factor w/ 2 levels "Colorimeter",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ Time  : int  0 0 0 0 0 0 0 0 0 0 ...
 $ Fruit : Factor w/ 20 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ...
> ## Second degree polynomial model with random intercept, slope and
> ## quadratic term including an exponential variance function using
> ## time as covariate.
> model<-lcc(dataset = hue, subject = "Fruit", resp = "H_mean",
+           method = "Method", time = "Time", qf = 2, qr = 2,
+           components = TRUE, time_lcc = list(from = min(hue$Time),
+           to = max(hue$Time), n=40), var.class=varExp,
+           weights.form="time")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
lcc
 --- call from context --- 
lccBuilder(G = G, diffbeta = diffbeta, tk = tk, q_r = q_r, q_f = q_f, 
    g = g, sig2_epsilon = sig2_epsilon, delta = delta, deltal = deltal, 
    model = model)
 --- call from argument --- 
if (class(S2) == "try-error") {
    stop(print("Please, change the name of factor levels associated with method argument. Example:  levels M1, M2, M3, ..., Mn, with n=0, 1, 2, ..., N."), 
        call. = FALSE)
}
 --- R stacktrace ---
where 1: lccBuilder(G = G, diffbeta = diffbeta, tk = tk, q_r = q_r, q_f = q_f, 
    g = g, sig2_epsilon = sig2_epsilon, delta = delta, deltal = deltal, 
    model = model)
where 2: lccWrapper(model = model, q_f = q_f, n.delta = 1, tk = tk.plot, 
    diffbeta = as.numeric(diffbeta[[1]]))
where 3: lccInternal(model = model, q_f = q_f, q_r = q_r, interaction = interaction, 
    tk = tk, covar = covar, pdmat = pdmat, diffbeta = betas, 
    time_lcc = time_lcc, ci = ci, percentileMet = percentileMet, 
    alpha = alpha, nboot = nboot, labels = lev.lab, var.class = var.class, 
    weights.form = weights.form, show.warnings = show.warnings, 
    components = components, lme.control = lme.control, method.init = MethodREML)
where 4: lcc(dataset = hue, subject = "Fruit", resp = "H_mean", method = "Method", 
    time = "Time", qf = 2, qr = 2, components = TRUE, time_lcc = list(from = min(hue$Time), 
        to = max(hue$Time), n = 40), var.class = varExp, weights.form = "time")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (G, diffbeta, tk, q_r, q_f, g, sig2_epsilon, delta, 
    deltal, model) 
{
    Tk_r <- sapply(0:q_r, function(x) tk^x)
    Tk_f <- sapply(0:q_f, function(x) tk^x)
    S2 <- try((as.matrix(Tk_f[, c(1:(length(diffbeta)))]) %*% 
        (diffbeta))^2, silent = TRUE)
    if (class(S2) == "try-error") {
        stop(print("Please, change the name of factor levels associated with method argument. Example:  levels M1, M2, M3, ..., Mn, with n=0, 1, 2, ..., N."), 
            call. = FALSE)
    }
    tGt <- diag(Tk_r %*% G %*% t(Tk_r))
    varcomp <- summary(model)
    var.f <- class(varcomp$modelStruct$varStruct)[1]
    rho <- list()
    if (var.f == "varIdent") {
        gd <- g(delta)
        gdl <- g(deltal)
        ldb2 <- length(gdl)
        for (i in 1:ldb2) {
            rho[[i]] <- as.numeric(tGt/(tGt + 0.5 * (sig2_epsilon * 
                (gd + gdl[i]) + S2)))
        }
    }
    if (var.f == "varExp") {
        if (attr(varcomp$modelStruct$varStruct, "formula") == 
            ~time) {
            gd <- g(delta, tk)
            gdl <- g(deltal, tk)
            rho <- list(tGt/(tGt + 0.5 * (sig2_epsilon * (gd + 
                gdl) + S2)), NA)
        }
        else {
            if (attr(varcomp$modelStruct$varStruct, "formula") == 
                ~time | FacA) {
                gd <- g(delta, tk)
                ldb2 <- length(deltal)
                gdl <- list()
                for (i in 1:ldb2) {
                  gdl[[i]] <- g(deltal[i], tk)
                  rho[[i]] <- as.numeric(unlist(tGt/(tGt + 0.5 * 
                    (sig2_epsilon * (gd + gdl[[i]]) + S2))))
                }
            }
            else {
                print("method not implemented yet")
            }
        }
    }
    if (var.f == "NULL") {
        rho <- list(tGt/(tGt + sig2_epsilon + 0.5 * S2), NA)
    }
    return(rho)
}
<bytecode: 0x561419912850>
<environment: namespace:lcc>
 --- function search by body ---
Function lccBuilder in namespace lcc has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1