# \donttest{
# Use 'iris' data
XX = as.matrix(iris[,1:4])
# Compute Persistence diagram and landscape of order 0
homology = diagRips(XX)
landscape = diag2landscape(homology, dimension=0)
# Plot with 'barcode'
opar <- par(no.readonly=TRUE)
plot(landscape)
par(opar)
# }
Run the code above in your browser using DataLab