diff --git a/R/CST_QuantileMapping.R b/R/CST_QuantileMapping.R index 257b5b6203817b5a34c07add6981f55c3e6aaf20..acd5259dd8f1c16da23ff21504c5b386fd7657b0 100644 --- a/R/CST_QuantileMapping.R +++ b/R/CST_QuantileMapping.R @@ -9,19 +9,19 @@ #'@param exp An object of class \code{s2dv_cube}. #'@param obs An object of class \code{s2dv_cube}. #'@param exp_cor A multidimensional array with named dimensions in which the -#'quantile mapping correction should be applied. If it is not specified, the -#'correction is applied to object 'exp' using leave-one-out cross-validation. -#'This is useful to correct a forecast when the hindcast is provided in parameter 'exp'. +#' quantile mapping correction should be applied. If it is not specified, the +#' correction is applied to object 'exp' using leave-one-out cross-validation. +#' This is useful to correct a forecast when the hindcast is provided in parameter 'exp'. #'@param sdate_dim A character string indicating the dimension name in which #' cross-validation would be applied when exp_cor is not provided. 'sdate' by #' default. #'@param memb_dim A character string indicating the dimension name where #' ensemble members are stored in the experimental arrays. It can be NULL if #' there is no ensemble member dimension. It is set as 'member' by default. -#'@param window_dim A character string indicating the dimension name in which extra -#'samples are stored. This dimension is joined to the 'member' dimension. -#'This is useful to correct daily data, for which robust statistics can be obtained -#'by creating a window of dates around the target date. +#'@param window_dim A character string indicating the dimension name in which extra +#' samples are stored. This dimension is joined to the 'member' dimension. +#' This is useful to correct daily data, for which robust statistics can be obtained +#' by creating a window of dates around the target date. #'@param method A character string indicating the method to be used:'PTF', #' 'DIST', 'RQUANT', 'QUANT', 'SSPLIN'. By default, the empirical quantile #' mapping 'QUANT' is used. @@ -101,9 +101,9 @@ CST_QuantileMapping <- function(exp, obs, exp_cor = NULL, sdate_dim = 'sdate', #'@param obs A multidimensional array with named dimensions containing the #' reference dataset. #'@param exp_cor A multidimensional array with named dimensions in which the -#'quantile mapping correction should be applied. If it is not specified, the -#'correction is applied to object 'exp' using leave-one-out cross-validation. -#'This is useful to correct a forecast when the hindcast is provided in parameter 'exp'. +#' quantile mapping correction should be applied. If it is not specified, the +#' correction is applied to object 'exp' using leave-one-out cross-validation. +#' This is useful to correct a forecast when the hindcast is provided in parameter 'exp'. #'@param sdate_dim A character string indicating the dimension name in which #' cross-validation would be applied when exp_cor is not provided. 'sdate' by #' default. @@ -111,9 +111,9 @@ CST_QuantileMapping <- function(exp, obs, exp_cor = NULL, sdate_dim = 'sdate', #' ensemble members are stored in the experimental arrays. It can be NULL if #' there is no ensemble member dimension. It is set as 'member' by default. #'@param window_dim A character string indicating the dimension name in which extra -#'samples are stored. This dimension is joined to the 'member' dimension. -#'This is useful to correct daily data, for which robust statistics can be obtained -#'by creating a window of dates around the target date. +#' samples are stored. This dimension is joined to the 'member' dimension. +#' This is useful to correct daily data, for which robust statistics can be obtained +#' by creating a window of dates around the target date. #'@param method A character string indicating the method to be used: 'PTF', #' 'DIST', 'RQUANT', 'QUANT', 'SSPLIN'. By default, the empirical quantile #' mapping 'QUANT' is used. @@ -137,8 +137,8 @@ CST_QuantileMapping <- function(exp, obs, exp_cor = NULL, sdate_dim = 'sdate', #'dim(obs) <- c(member = 1, syear = 10, window = 15) #'fcst <- 100*(1:prod(8,1,1)) #'dim(fcst) <- c(member = 8, syear = 1, swindow = 1) -#'res <- QuantileMapping(exp = exp, obs = obs, exp_cor = fcst, memb_dim = 'member', -#' sdate_dim = 'syear', window_dim = 'window') +#'res <- QuantileMapping(exp = exp, obs = obs, exp_cor = fcst, +#' memb_dim = 'member', sdate_dim = 'syear', window_dim = 'window') #'@import qmap #'@import multiApply #'@import s2dv