Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Earth Sciences
startR
Commits
0fb9eed7
Commit
0fb9eed7
authored
Jan 19, 2021
by
aho
Browse files
Revise document about *_var, remove *_var if * is not values.
parent
2767bda3
Changes
2
Hide whitespace changes
Inline
Side-by-side
R/Start.R
View file @
0fb9eed7
...
...
@@ -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.
...
...
man/Start.Rd
View file @
0fb9eed7
...
...
@@ -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
...
...
aho
@aho
mentioned in issue
#83
·
Jan 19, 2021
mentioned in issue
#83
mentioned in issue #83
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment