R/ademaps-internal.R

Defines functions adeoptions .onLoad

Documented in adeoptions

##### Chargement de base



## An environment useful to store the options
.adehabitatMAEnv <- new.env()

.onLoad <- function(lib, pkg)
{
    environment(.adehabitatMAEnv) <- asNamespace("adehabitatMA")
    assign(".adeoptions", list(epsilon=1e-8),
           envir=.adehabitatMAEnv)

}




adeoptions <- function(...)
{
    olde <- get(".adeoptions", envir=.adehabitatMAEnv)
    class(olde) <- "optade"
    oo <- list(...)
    if (length(oo)>0) {
        if (is.list(oo[[1]])) {
            if (inherits(oo[[1]], "optade"))
                oo <- oo[[1]]
        }
        newe <- olde
        for (i in names(oo)) {
            newe[[i]] <- oo[[i]]
        }
        assign(".adeoptions", newe, envir=.adehabitatMAEnv)
        invisible(olde)
    } else {
        return(olde)
    }
}

Try the adehabitatMA package in your browser

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

adehabitatMA documentation built on April 6, 2023, 5:19 p.m.