Diff of /R/listTargets.R [000000] .. [28aa3b]

Switch to unified view

a b/R/listTargets.R
1
#' List available targets
2
#'
3
#' This function lists available targets for a given \code{cdf} argument.
4
#' @param cdf A character. Either \code{"affy"} or \code{"brainarray"}.
5
#' @param version A character giving the brainarray version.
6
#'   See \code{listVersions()}. Ignored if \code{cdf == "affy"}.
7
#' @return A character vector of the available targets.
8
#' @examples
9
#' listTargets("affy")
10
#' listTargets("brainarray", version = "18.0.0")
11
#' listTargets("brainarray", version = "17.1.0")
12
#' listTargets("brainarray", version = "15.0.0")
13
#' @export
14
listTargets <- function(cdf, version = getLatestVersion()) {
15
  if (cdf == "affy") {
16
    message("Listing 'affy' targets is not fully implemented yet!")
17
    return(getAffyTargets())
18
  } else if (cdf == "brainarray") {
19
    return(getBrainarrayTargets(version))
20
  } else {
21
    stop("The argument cdf must equal either 'affy' or 'brainrray'.")
22
  }
23
}