R/is.regular.r

Defines functions is.regular

Documented in is.regular

is.regular <- function(ltraj)
{
    if (!inherits(ltraj,"ltraj"))
        stop("ltraj should be of class \"ltraj\"")
    if (!attr(ltraj, "typeII")) {
        return(FALSE)
    } else {
        return(sum(unlist(lapply(ltraj, function(x) {
            ddt <- x$dt[-nrow(x)]
            return(sum(abs(ddt-x$dt[1]) > 1e-7))
        }))) ==0 )
    }
}

Try the adehabitatLT package in your browser

Any scripts or data that you put into this service are public.

adehabitatLT documentation built on April 6, 2023, 5:18 p.m.