diff --git a/R/Composite.R b/R/Composite.R index 90abb5bae7d9caa5c6c1b1453da31d4947e995f3..f68604971373b1fc9cdadd1af01e5640557ff86c 100644 --- a/R/Composite.R +++ b/R/Composite.R @@ -69,11 +69,12 @@ #' #'filled.contour(Composite(var=f1, occ=occ2)$composite[,,1]) #' -#'Example with one missing composite (#3) in occ: +#'# Example with one missing composite (#3) in occ: #'data <- 1 : (4 * 5 * 6) #'dim(data) <- c(lon = 4, lat = 5, case = 6) #'occ <- c(1, 1, 2, 2, 3, 3) #'res <- Composite(data, occ, K = 4) +#' #'@importFrom stats sd pt #'@export Composite <- function(var, occ, lag = 0, eno = FALSE, K = NULL, fileout = NULL) { diff --git a/man/Composite.Rd b/man/Composite.Rd index 4e990020d18f83c62e7104c49cd39c3985ab62ef..3d9a3fd8eba3c149af352eb0027b8688dce3e8c4 100644 --- a/man/Composite.Rd +++ b/man/Composite.Rd @@ -4,7 +4,7 @@ \alias{Composite} \title{Computes composites} \usage{ -Composite(var, occ, lag = 0, eno = FALSE, fileout = NULL) +Composite(var, occ, lag = 0, eno = FALSE, K = NULL, fileout = NULL) } \arguments{ \item{var}{3-dimensional array (x, y, time) containing the variable to @@ -23,6 +23,8 @@ use +2 occurrences (i.e., shifted 2 time steps forward). Default is lag = 0.} \item{eno}{For using the effective sample size (TRUE) or the total sample size (FALSE that is the default) for the number of degrees of freedom.} +\item{K}{numeric value indicating the maximum number of composites. By default (NULL), it takes the maximum value provided in occ.} + \item{fileout}{Name of the .sav output file (NULL is the default).} } \value{ @@ -76,6 +78,13 @@ occ2 <- rep(0, 30) occ2[c(3, 9, 15, 21)] <- 1 filled.contour(Composite(var=f1, occ=occ2)$composite[,,1]) + +# Example with one missing composite (#3) in occ: +data <- 1 : (4 * 5 * 6) +dim(data) <- c(lon = 4, lat = 5, case = 6) +occ <- c(1, 1, 2, 2, 3, 3) +res <- Composite(data, occ, K = 4) + } \author{ History: