Skip to contents

Remove a stored analysis object from a tidymatrix. This removes the full analysis object but keeps any metadata columns that were added.

Usage

remove_analysis(x, name = NULL)

Arguments

x

A tidymatrix object

name

Name of the analysis to remove. If NULL, removes all analyses.

Value

A tidymatrix object with the analysis removed

Examples

tm <- tidymatrix(matrix(rnorm(100), 10, 10))
tm <- tm |>
  activate(columns) |>
  compute_prcomp(name = "pca")

# Remove specific analysis
tm <- remove_analysis(tm, "pca")

# Remove all analyses
tm <- remove_analysis(tm, NULL)