partition_scores: Return the reduced data from a partition

View source: R/mappings.R

partition_scoresR Documentation

Return the reduced data from a partition

Description

The reduced data is stored as reduced_data in the partition object and can thus be returned by subsetting object$reduced_data. Alternatively, the functions partition_score() and fitted() also return the reduced data.

Usage

partition_scores(object, ...)

## S3 method for class 'partition'
fitted(object, ...)

Arguments

object

a partition object

...

not currently used (for S3 consistency with fitted())

Value

a tibble containing the reduced data for the partition

Examples

set.seed(123)
df <- simulate_block_data(c(3, 4, 5), lower_corr = .4, upper_corr = .6, n = 100)
# fit partition
prt <- partition(df, threshold = .6)


# three ways to retrieve reduced data
partition_scores(prt)
fitted(prt)
prt$reduced_data


USCbiostats/partition documentation built on Feb. 3, 2024, 3:38 a.m.