as.target: Constructs a target variable (for subgroup discovery)

Description Usage Arguments See Also Examples

View source: R/subgroup.R

Description

Constructs a target variable, i.e., an object suitable to be passed to DiscoverSubgroups or CreateSDTask.

Usage

1
as.target(attribute, value=NULL)

Arguments

attribute

The attribute of the target variable.

value

For binary targets, the respective attribute value; the value is NULL for numeric targets.

See Also

DiscoverSubgroups.

Examples

1
2
3
4
5
6
# creating a target variable
# binary:
as.target("class", "true")

#numeric:
as.target("numeric_class")

Example output

Loading required package: rJava
Loading required package: foreign
OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
$attribute
[1] "class"

$value
[1] "true"

$attribute
[1] "numeric_class"

Warning message:
system call failed: Cannot allocate memory 

rsubgroup documentation built on Feb. 23, 2021, 3 a.m.