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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: cltsk
> ### Title: Function calls 'ltsk' using cumulatively expanding time space
> ###   thresholds. This function is useful when predictions are needed using
> ###   data points at different spatiotemporal intervals.  For example, if
> ###   predictions are needed at a given location for the past 30 days at an
> ###   interval of 3 days.  Instead of using 'ltsk' 10 times, 'cltsk' can
> ###   compute all 10 values simultaneously.
> ### Aliases: cltsk
> 
> ### ** Examples
> 
> ## load the data
> data(ex)
> data(epa_cl)
> ## apply log transformation
> obs[,'pr_pm25'] = log(obs[,'pr_pm25'])
> ## run kriging
> system.time(out <- cltsk(ex2.query[1:2,],obs,c(0.10,10),
+   zcoord='pr_pm25',nbins=c(4,5),verbose=FALSE,cl=0))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
ltsk
 --- call from context --- 
dnb(q0, obs, th, future = future)
 --- call from argument --- 
if (class(obs) == "data.frame") {
    obs <- as.matrix(obs)
}
 --- R stacktrace ---
where 1: dnb(q0, obs, th, future = future)
where 2: FUN(newX[, i], ...)
where 3: apply(l.query, 1, working.cltsk, obs = l.obs, th = th, bins = bins, 
    vth = vth, vlen = vlen, llim = llim, verbose = verbose, Large = Large, 
    future = future)
where 4: cltsk(ex2.query[1:2, ], obs, c(0.1, 10), zcoord = "pr_pm25", 
    nbins = c(4, 5), verbose = FALSE, cl = 0)
where 5: system.time(out <- cltsk(ex2.query[1:2, ], obs, c(0.1, 10), zcoord = "pr_pm25", 
    nbins = c(4, 5), verbose = FALSE, cl = 0))

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (query, obs, th, future = TRUE) 
{
    if (class(query) == "data.frame") {
        query <- as.matrix(query)
        query <- as.vector(query)
    }
    if (class(obs) == "data.frame") {
        obs <- as.matrix(obs)
    }
    if (future) {
        tvec <- abs(query[3] - obs[, 3])
        iit <- which(tvec < th[2])
    }
    else {
        tvec <- obs[, 3] - query[3]
        iit <- which(tvec > -th[2] & tvec <= 0)
    }
    loc0 <- matrix(query[1:2], ncol = 2)
    locs <- obs[iit, 1:2]
    dvec <- as.vector(rdist(loc0, locs))
    iid <- which(dvec < th[1])
    iit[iid]
}
<bytecode: 0x56513635b7a8>
<environment: namespace:ltsk>
 --- function search by body ---
Function dnb in namespace ltsk has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1