is.PHom {ripserr} | R Documentation |
Check PHom Object
Description
Tests if objects are valid PHom
instances.
Usage
is.PHom(x)
Arguments
x |
object whose |
Value
TRUE
if x
is a valid PHom
object; FALSE
otherwise
Examples
# create sample persistence data
df <- data.frame(dimension = c(0, 0, 1, 1, 1, 2),
birth = rnorm(6),
death = rnorm(6, mean = 15))
df <- as.PHom(df)
# confirm that persistence data is valid
is.PHom(df)
# mess up df object (feature birth cannot be after death)
df$birth[1] <- rnorm(1, mean = 50)
# confirm that persistence data is NOT valid
is.PHom(df)
[Package ripserr version 0.3.0 Index]