@@ -4,6 +4,36 @@ flyem_dataset <- function(dataset) {
4
4
cds [[dataset ]]
5
5
}
6
6
7
+ # ' Choose active male VNC / FlyEM dataset
8
+ # '
9
+ # ' @description \code{choose_malevnc_dataset} chooses the dataset that will be
10
+ # ' used by the male VNC package.
11
+ # ' @details For \code{choose_malevnc_dataset} the \code{dataset} will be one of
12
+ # ' \code{MANC} (release) or \code{VNC} (pre-release) dataset. Note the latter
13
+ # ' will only be available for authenticated collaborators of the FlyEM team.
14
+ # ' When \code{dataset=NULL} the options("malevnc.dataset") will be checked,
15
+ # ' then the environment variable \code{MALEVNC_DATASET} and finally the
16
+ # ' default value (MANC i.e. released dataset) will be selected.
17
+ # '
18
+ # ' @param dataset Character vector specifying dataset name. Default value of
19
+ # ' \code{NULL} will respect package options or choose default dataset if none
20
+ # ' set.
21
+ # ' @param set Whether to set the relevant package options or just to return the,
22
+ # ' @param use_clio Whether to use clio to list datasets (expert use only;
23
+ # ' default of \code{use_clio=NA} should do the right thing).
24
+ # '
25
+ # ' @return A list of options (when \code{set=FALSE}) or the \emph{previous}
26
+ # ' value of those options, mimicking the behaviour of \code{\link{options}}.
27
+ # ' @export
28
+ # '
29
+ # ' @examples
30
+ # ' \dontrun{
31
+ # ' # switch dataset
32
+ # ' op <- choose_malevnc_dataset("MANC")
33
+ # ' on.exit(options(op))
34
+ # ' # reset the previous state
35
+ # ' options(op)
36
+ # ' }
7
37
choose_malevnc_dataset <- function (dataset = NULL ,
8
38
set = TRUE ,
9
39
use_clio = NA ) {
@@ -31,6 +61,11 @@ choose_malevnc_dataset <- function(dataset=NULL,
31
61
choose_flyem_dataset(dataset = dataset , set = set )
32
62
}
33
63
64
+ # ' @rdname choose_malevnc_dataset
65
+ # ' @export
66
+ # ' @description \code{choose_flyem_dataset} is a generic function underneath
67
+ # ' \code{choose_malevnc_dataset}. It is intended primarily for developers of
68
+ # ' other packages.
34
69
choose_flyem_dataset <- function (dataset = getOption(" malevnc.dataset" ), set = TRUE ) {
35
70
ds = flyem_dataset(dataset )
36
71
s = flyem_servers4dataset(ds )
0 commit comments