]> nmode's Git Repositories - Rnaught/blobdiff - R/IDEA.R
Remove input args from output lists
[Rnaught] / R / IDEA.R
index 7668540c66755d9025167a9e789cb27da98a0875..53cfaa7626b2fc31d18052faaf909d1947aead3b 100644 (file)
--- a/R/IDEA.R
+++ b/R/IDEA.R
 #'         \code{inputs} is a list of the original input variables \code{NT, mu}.\r
 #'\r
 #' @examples\r
-#'\r
 #' ## ===================================================== ##\r
 #' ## Illustrate on weekly data                             ##\r
 #' ## ===================================================== ##\r
 #'\r
 #' NT <- c(1, 4, 10, 5, 3, 4, 19, 3, 3, 14, 4)\r
 #' ## obtain Rhat when serial distribution has mean of five days\r
-#' res1 <- IDEA(NT=NT, mu=5/7)\r
-#' res1$Rhat\r
+#' IDEA(NT=NT, mu=5/7)\r
 #' ## obtain Rhat when serial distribution has mean of three days\r
-#' res2        <- IDEA(NT=NT, mu=3/7)\r
-#' res2$Rhat\r
+#' IDEA(NT=NT, mu=3/7)\r
 #'\r
 #' ## ========================================================= ##\r
 #' ## Compute Rhat using only the first five weeks of data      ##\r
 #' ## ========================================================= ##\r
 #'\r
-#'\r
-#' res3 <- IDEA(NT=NT[1:5], mu=5/7)            # serial distribution has mean of five days\r
-#' res3$Rhat\r
+#' IDEA(NT=NT[1:5], mu=5/7) # serial distribution has mean of five days\r
 #'\r
 #' @export\r
 IDEA <- function(NT, mu) {\r
@@ -59,6 +54,6 @@ IDEA <- function(NT, mu) {
         IDEA2 <- TT * sum(y2) - sum(s)^2\r
         IDEA <- exp(IDEA1 / IDEA2)\r
 \r
-        return(list(Rhat=IDEA, inputs=list(NT=NT, mu=mu)))\r
+        return(IDEA)\r
     }\r
 }\r