diff --git a/DESCRIPTION b/DESCRIPTION index 9513d9e..2aaad6b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: crawl Type: Package Title: Fit Continuous-Time Correlated Random Walk Models to Animal Movement Data Version: 2.3.1 -Date: 2024-10-02 +Date: 2024-10-03 Authors@R: c(person("Devin S.", "Johnson", email = "devin.johnson@noaa.gov", role = c("aut", "cre")), person("Josh", "London", email = "josh.london@noaa.gov", @@ -36,7 +36,7 @@ Encoding: UTF-8 LazyLoad: yes ByteCompile: TRUE NeedsCompilation: yes -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 URL: https://github.com/NMML/crawl BugReports: https://github.com/NMML/crawl/issues LazyData: true diff --git a/R/crawl-internal.R b/R/crawl-internal.R index 1f8f522..946ff0d 100644 --- a/R/crawl-internal.R +++ b/R/crawl-internal.R @@ -82,3 +82,17 @@ sfc_as_cols <- function(x, geometry, names = c("x","y")) { ret <- setNames(ret,names) dplyr::bind_cols(x,ret) } + +# conf_elps <- function(x, y, V, prob=0.95){ +# require(sf, quietly = TRUE) +# v <- eigen(V)$vectors +# lambda <- eigen(V)$values +# t <- seq(0,2*pi, length=50) +# m <- qchisq(prob,2) +# x_l <- x + sqrt(m*lambda[1])*v[1,1]*cos(t) + sqrt(m*lambda[2])*v[1,2]*sin(t) +# y_l <- y + sqrt(m*lambda[1])*v[2,1]*cos(t) + sqrt(m*lambda[2])*v[2,2]*sin(t) +# ell <- cbind(x=x_l, y=y_l) +# ell <- st_linestring(ell) |> st_cast("POLYGON") +# return(st_sfc(list(ell))) +# } + diff --git a/R/crawl-package.R b/R/crawl-package.R index a682bf8..4e746bd 100644 --- a/R/crawl-package.R +++ b/R/crawl-package.R @@ -10,7 +10,7 @@ #' Package: \tab crawl\cr #' Type: \tab Package\cr #' Version: \tab 2.3.1\cr -#' Date: \tab October 2, 2024\cr +#' Date: \tab October 3, 2024\cr #' License: \tab CC0 \cr #' LazyLoad: \tab yes\cr #' } @@ -25,7 +25,6 @@ #' #' @name crawl-package #' @aliases crawl-package crawl -#' @docType package #' @author Josh London and Devin S. Johnson #' #' Maintainer: Devin S. Johnson @@ -40,8 +39,8 @@ #' na.pass optim pchisq pexp pnorm qnorm #' rchisq runif sd setNames median rnorm #' @useDynLib crawl, .registration = TRUE +"_PACKAGE" -NULL if(getRversion() >= "2.15.1") utils::globalVariables(c(".")) diff --git a/R/crwPredict.R b/R/crwPredict.R index 987f6a1..71ca79e 100644 --- a/R/crwPredict.R +++ b/R/crwPredict.R @@ -21,14 +21,11 @@ #' @param return.type character. Should be one of \code{"minimal","flat","list"} (see Details). #' @param ... Additional arguments for testing new features #' -#' @details -#' \itemize{ -#' \item("predTime"){ -#' \code{predTime} can be either passed as a separate vector of POSIXct or +#' @details \code{predTime} can be either passed as a separate vector of POSIXct or #' numeric values for all prediction times expected in the returned object. #' Note, previous versions of \code{crwPredict} would return both times #' specified via \code{predTime} as well as each original observed time. This is -#' no longer the default (see \item{return.type}). If the original data were +#' no longer the default (see \code{return.type}). If the original data were #' provided as a POSIXct type, then \code{crwPredict} can derive a sequence of #' regularly spaced prediction times from the original data. This is specified #' by providing a character string that corresponds to the \code{by} argument @@ -37,8 +34,6 @@ #' (e.g. '1 hour' will round up to the nearest hour, '30 mins' will round up to #' the nearest minute) and start the sequence from there. The last observation #' time is truncated down to the nearest unit to specify the end time. -#' } -#' } #' #' @return #' diff --git a/man/crawl-package.Rd b/man/crawl-package.Rd index 6276057..ad28b71 100644 --- a/man/crawl-package.Rd +++ b/man/crawl-package.Rd @@ -15,8 +15,8 @@ version of the continuous-time stochastic movement process. \tabular{ll}{ Package: \tab crawl\cr Type: \tab Package\cr -Version: \tab 2.3.0\cr -Date: \tab October 6, 2022\cr +Version: \tab 2.3.1\cr +Date: \tab October 3, 2024\cr License: \tab CC0 \cr LazyLoad: \tab yes\cr } diff --git a/man/crwPredict.Rd b/man/crwPredict.Rd index 02f4f3c..93d698c 100644 --- a/man/crwPredict.Rd +++ b/man/crwPredict.Rd @@ -49,14 +49,11 @@ detection. The requirements for \code{data} are the same as those for fitting the model in \code{\link{crwMLE}}. - -\itemize{ -\item("predTime"){ \code{predTime} can be either passed as a separate vector of POSIXct or numeric values for all prediction times expected in the returned object. Note, previous versions of \code{crwPredict} would return both times specified via \code{predTime} as well as each original observed time. This is - no longer the default (see \item{return.type}). If the original data were + no longer the default (see \code{return.type}). If the original data were provided as a POSIXct type, then \code{crwPredict} can derive a sequence of regularly spaced prediction times from the original data. This is specified by providing a character string that corresponds to the \code{by} argument @@ -66,8 +63,6 @@ specified via \code{predTime} as well as each original observed time. This is the nearest minute) and start the sequence from there. The last observation time is truncated down to the nearest unit to specify the end time. } -} -} \references{ de Jong, P. and Penzer, J. (1998) Diagnosing shocks in time series. Journal of the American Statistical Association 93:796-806.