Skip to contents

Check if stored analyses are still valid given the current data dimensions.

Usage

check_analyses(x)

Arguments

x

A tidymatrix object

Value

Invisibly returns x. Reports the status of each analysis as a message.

Examples

library(dplyr, warn.conflicts = FALSE)
tm <- tidymatrix(matrix(rnorm(100), 10, 10))
tm <- tm |>
  activate(columns) |>
  compute_prcomp(name = "pca")

check_analyses(tm)
#> Analysis 'pca': VALID (10 rows x 10 columns)
# Analysis 'pca': VALID (10 rows x 10 columns)

tm <- tm |> activate(rows) |> filter(row_number() <= 5)
#> Warning: Removed 1 stored analysis object(s) due to filter: pca
#> Metadata columns are preserved.
check_analyses(tm)
#> No stored analyses
# Analysis 'pca': dimensions changed (was 10 rows, now 5 rows)