Returns the first part of a PHom instance.

# S3 method for class 'PHom'
head(x, ...)

Arguments

x

object of class PHom

...

other parameters

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_phom <- as.PHom(df)

# look at first 3 features
head(df_phom)
#>   dimension      birth    death
#> 1         0 -0.1241795 16.02819
#> 2         0 -0.6127534 13.86542
#> 3         1  0.1606625 15.91691
#> 4         1 -0.6623596 16.21387
#> 5         1 -0.3348517 14.31407
#> 6         2  0.6230116 13.90543

# look at last 3 features
tail(df_phom)
#>   dimension      birth    death
#> 1         0 -0.1241795 16.02819
#> 2         0 -0.6127534 13.86542
#> 3         1  0.1606625 15.91691
#> 4         1 -0.6623596 16.21387
#> 5         1 -0.3348517 14.31407
#> 6         2  0.6230116 13.90543