Commit 0fb9eed7 authored by aho's avatar aho
Browse files

Revise document about *_var, remove *_var if * is not values.

parent 2767bda3
......@@ -174,13 +174,15 @@
#'a list with two values can also be provided to take all the indices of the
#'values within the specified range.
#'\cr\cr
#'The \bold{name of the associated coordinate variable} must be a character
#'string with the name of an associated coordinate variable to be found in the
#'data files (in all* of them). For this to work, a 'file_var_reader'
#'function must be specified when calling Start() (see parameter
#''file_var_reader'). The coordinate variable must also be requested in the
#'parameter 'return_vars' (see its section for details). This feature only
#'works for inner dimensions.
#'The \bold{name of the associated coordinate variable} '<dimname>_var' must be
#'a character string with the name of an associated coordinate variable to be
#'found in the data files (in all* of them). For this to work, a
#''file_var_reader' function must be specified when calling Start() (see
#'parameter 'file_var_reader'). '<dimname>_var' is only needed when <dimname>
#'is assigned by 'values'. Start() automatically creates
#'\code{<dimname_var = '<dimname>'} if it is not specified. The coordinate
#'variable must also be requested in the parameter 'return_vars' (see its
#'section for details). This feature only works for inner dimensions.
#'\cr\cr
#'The \bold{tolerance value} is useful when indices for an inner dimension are
#'specified in the third format (values of whichever type). In that case, the
......@@ -1520,6 +1522,16 @@ Start <- function(..., # dim = indices/selectors,
attr(dat_selectors[[dim_name]], 'values') <- !flag
attr(dat_selectors[[dim_name]], 'indices') <- flag
}
# If xxx_var exists but xxx is not values, remove xxx_var
if (dim_name %in% names(var_params) & !(attr(dat_selectors[[dim_name]], 'values'))) {
var_params[[dim_name]] <- NULL
if (length(var_params) < 1) var_params <- NULL
.warning(paste0("Dimension ", dim_name, " is not specified by values while ",
dim_name, "_var is assigned. Remove ", dim_name, "_var from ",
"the call."))
}
## The following code 'rewrites' var_params for all datasets. If providing different
## path pattern repositories with different file/inner dimensions, var_params might
## have to be handled for each dataset separately.
......
......@@ -512,13 +512,15 @@ indices of the closest values will be retrieved. When using the third format,
a list with two values can also be provided to take all the indices of the
values within the specified range.
\cr\cr
The \bold{name of the associated coordinate variable} must be a character
string with the name of an associated coordinate variable to be found in the
data files (in all* of them). For this to work, a 'file_var_reader'
function must be specified when calling Start() (see parameter
'file_var_reader'). The coordinate variable must also be requested in the
parameter 'return_vars' (see its section for details). This feature only
works for inner dimensions.
The \bold{name of the associated coordinate variable} '<dimname>_var' must be
a character string with the name of an associated coordinate variable to be
found in the data files (in all* of them). For this to work, a
'file_var_reader' function must be specified when calling Start() (see
parameter 'file_var_reader'). '<dimname>_var' is only needed when <dimname>
is assigned by 'values'. Start() automatically creates
\code{<dimname_var = '<dimname>'} if it is not specified. The coordinate
variable must also be requested in the parameter 'return_vars' (see its
section for details). This feature only works for inner dimensions.
\cr\cr
The \bold{tolerance value} is useful when indices for an inner dimension are
specified in the third format (values of whichever type). In that case, the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment