Skip to content

Error in as_persistence when applied to ripsDiag output from do.call #54

@bobbyryan215

Description

@bobbyryan215

Hello,

The following error arises when I attempt to convert do.call output from TDA::ripsDiag using phutil::as_persistence. A similar error does not arise when using output from the ripserr::vietoris_rips package, so I expected TDA::rispDiag output to convert in the same way.

Here is the error below.

library(TDA)
library(phutil)
X <- matrix(rnorm(20), ncol = 2) 
do.call(ripsDiag, c(list(X = X, maxdimension = 2, maxscale = 10))) |> as_persistence()
#> Error in if (filt_nm == "rips") {: argument is of length zero

Expected behavior with ripserr::vietoris_rips.

library(ripserr)
library(phutil)
X <- matrix(rnorm(20), ncol = 2) 
do.call(vietoris_rips, c(list(dataset = X))) |> as_persistence()
#> 
#> ── Persistence Data ────────────────────────────────────────────────────────────
#> ℹ There are 10 and 1 pairs in dimensions 0 and 1 respectively.
#> ℹ Computed from a Vietoris-Rips/Cubical filtration using `ripserr::<vietoris_rips/cubical>()`.
#> ! With unknown parameters.

Here is my version of R.

platform aarch64-apple-darwin20
arch aarch64
os darwin20
system aarch64, darwin20
status
major 4
minor 5.1
year 2025
month 06
day 13
svn rev 88306
language R
version.string R version 4.5.1 (2025-06-13)
nickname Great Square Root

Thank you,
Robert Ryan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions