list_experiments.RdExperiments can be represented by two object classes: Experiment and
ExperimentIdentifier. The fields that make up an ExperimentIdentifier
object are a subset of those required for an Experiment object. Therefore
an experiment can be turned into an experiment id object without an API
call, using the function as_experiment_id(). The reverse can be achieved
by calling list_experiments() on experiment id objects. In general,
experiments and experiment id objects can be listed using
list_experiments() and list_experiment_ids().
list_experiments(token, x, ...) # S3 method for ExperimentIdentifier list_experiments(token, x, ...) # S3 method for Project list_experiments(token, x, types = list_experiment_types(token), require = c(NA, "DataSets", "Samples"), ...) list_experiment_ids(token, ...) list_experiment_types(token, ...) as_experiment_id(x, ...) # S3 method for Experiment as_experiment_id(x, ...) # S3 method for ExperimentIdentifier as_experiment_id(x, ...)
| token | Login token as created by  | 
|---|---|
| x | Object to limit the number of returned experiments, e.g. a set of
 | 
| ... | Generic compatibility. Extra arguments will be passed to
 | 
| types | Either a single or set of  | 
| require | A switch to require the resulting experiments to contain a nonzero number of dataset or sample. Default behavior is no requirement. | 
Depending on the number of resulting objects, either a
json_class (single object) or a json_vec (multiple objects), is
returned. Experiments are represented by Experiment, experiment ids by
ExperimentIdentifier and experiment types by ExperimentType objects.
By calling list_experiments() on project objects, all corresponding
experiments are listed. It is possible to limit the search to experiments
that are of a certain type and exclude experiments that either have no
datasets or samples associated. An exhaustive list of realized experiment
types can be retrieved using list_experiment_types(). If several
experiment types are requested in list_experiments(), the default is to
iterate over all available types, an API call per experiment type has to be
made.
ExperimentIdentifier objects present a more compact way of uniquely
representing experiments. All experiments that are available to the current
user can be listed with list_experiment_ids(). There is no way of limiting
the search for experiments.
Other object listing functions: list_datasets,
  list_material, list_plates,
  list_projects, list_samples
# \donttest{ tok <- login_openbis() # list all available projects to limit the search for experiments proj <- list_projects(tok) # list all experiments corresponding to the project with index 1 exps <- list_experiments(tok, proj[[1L]]) # convert experiment to experiment ids and back exp_ids <- as_experiment_id(exps) identical(exps, list_experiments(tok, exp_ids))#> [1] TRUE# experiments can also be searched for exp <- search_openbis(tok, search_criteria( attribute_clause("code", get_field(exps[[1L]], "identifier")) ), target_object = "experiment") identical(exps[[1L]], exp)#> [1] TRUE