R/listOMLTaskTypes.R

Defines functions .listOMLTaskTypes

.listOMLTaskTypes = function(verbosity = NULL) {
  content = doAPICall(api.call = "json/tasktype/list", file = NULL,
                      verbosity = verbosity, method = "GET")
  res = fromJSON(txt = content)$task_types$task_type
  ret = setDT(res[, c("id", "name")])
  ret[, id := as.integer(id)]
  ret[]
}

#' @title List available OpenML task types.
#'
#' @description
#' The returned \code{data.frame} contains the type \code{id} and the character
#' name of the OpenML task type.
#'
#' @template note_memoise
#'
#' @template arg_verbosity
#' @return [\code{data.frame}].
#' @family listing functions
#' @family task-related functions
#' @export
#' @example inst/examples/listOMLTaskTypes.R
listOMLTaskTypes = memoise(.listOMLTaskTypes)
openml/oml-r documentation built on Aug. 1, 2019, 8:06 p.m.