]> nmode's Git Repositories - Rnaught/commitdiff
Include required functions from 'stats' package
authorNaeem Model <me@nmode.ca>
Thu, 22 Jun 2023 05:11:43 +0000 (05:11 +0000)
committerNaeem Model <me@nmode.ca>
Thu, 22 Jun 2023 05:11:43 +0000 (05:11 +0000)
NAMESPACE
R/WP.R
R/WP_unknown.R

index eb1e732f1d7994ad2fa1b2e70c3a1873b8c6e18a..461d6f84d1b2d44f21f53964a9d562887fe86baf 100644 (file)
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -4,3 +4,7 @@ export(ID)
 export(IDEA)
 export(WP)
 export(seqB)
+importFrom(stats,pexp)
+importFrom(stats,pgamma)
+importFrom(stats,qexp)
+importFrom(stats,qgamma)
diff --git a/R/WP.R b/R/WP.R
index 76012be9d5c585c1fa0b2d4a56a0dd75e33e0104..c8178b7b168c462175bb5e4a320d78a98858c569 100644 (file)
--- a/R/WP.R
+++ b/R/WP.R
@@ -73,6 +73,8 @@
 #' res4 <- WP(NT=NT[1:5], mu=5/7) # serial distribution has mean of five days
 #' res4$Rhat
 #'
+#' @importFrom stats pexp qexp
+#'
 #' @export
 WP <- function(NT, mu=NA, search=list(B=100, shape.max=10, scale.max=10), tol=0.999) {
     if (is.na(mu)) {
index 832a3baa77d79577f302ff1b6fdac0ebe9307ddb..f339836705aab45e4c78043c75d580f53e9804e2 100644 (file)
@@ -20,6 +20,8 @@
 #'         \code{J0} (the location for the maximum likelihood estimator \code{Rhat}). If \code{JJ} and \code{J0}
 #'         are not the same, this means that the maximum likelihood estimator is not unique.
 #'
+#' @importFrom stats pgamma qgamma
+#'
 #' @keywords internal
 WP_unknown <- function(NT, B=100, shape.max=10, scale.max=10, tol=0.999) {
        shape <- seq(0, shape.max, length.out=B+1)