Learn R Programming

mlr3cluster (version 0.1.9)

as_task_clust: Convert to a Cluster Task

Description

Convert object to a TaskClust. This is a S3 generic, specialized for at least the following objects:

  1. TaskClust: ensure the identity.

  2. data.frame() and DataBackend: provides an alternative to calling constructor of TaskClust.

Usage

as_task_clust(x, ...)

# S3 method for TaskClust as_task_clust(x, clone = FALSE, ...)

# S3 method for data.frame as_task_clust(x, id = deparse(substitute(x)), ...)

# S3 method for DataBackend as_task_clust(x, id = deparse(substitute(x)), ...)

# S3 method for formula as_task_clust(x, data, id = deparse(substitute(data)), ...)

Value

TaskClust.

Arguments

x

(any)
Object to convert.

...

(any)
Additional arguments.

clone

(logical(1))
If TRUE, ensures that the returned object is not the same as the input x.

id

(character(1))
Id for the new task. Defaults to the (deparsed and substituted) name of the data argument.

data

(data.frame())
Data frame containing all columns specified in formula x.

Examples

Run this code
as_task_clust(datasets::USArrests)

Run the code above in your browser using DataLab