# summary.diagram: 'print' and 'summary' for 'diagram' In TDA: Statistical Tools for Topological Data Analysis

## Description

The function `print.diagram` prints a persistence diagram, a P by 3 matrix, where P is the number of points in the diagram. The first column contains the dimension of each feature (0 for components, 1 for loops, 2 for voids, etc.). Second and third columns are Birth and Death of the features.

The function `summary.diagram` produces basic summaries of a persistence diagrams.

## Usage

 ```1 2 3 4``` ```## S3 method for class 'diagram' print(x, ...) ## S3 method for class 'diagram' summary(object, ...) ```

## Arguments

 `x` an object of class `diagram` `object` an object of class `diagram` `...` additional arguments affecting the summary produced.

## Author(s)

Fabrizio Lecci

`plot.diagram`, `alphaComplexDiag`, `alphaComplexDiag`, `gridDiag`, `ripsDiag`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```# Generate data from 2 circles XX1 <- circleUnif(30) XX2 <- circleUnif(30, r = 2) + 3 XX <- rbind(XX1, XX2) DiagLim <- 5 # limit of the filtration maxdimension <- 1 # computes betti0 and betti1 Diag <- ripsDiag(XX, maxdimension, DiagLim, printProgress = TRUE) print(Diag[["diagram"]]) print(summary(Diag[["diagram"]])) ```

### Example output

```# Generated complex of size: 20125
# Persistence timer: Elapsed time [ 0.000000 ] seconds
dimension     Birth        Death
[1,]         0 0.0000000 5.0000000000
[2,]         0 0.0000000 1.3191321290
[3,]         0 0.0000000 1.1272556271
[4,]         0 0.0000000 0.9025702288
[5,]         0 0.0000000 0.8474101480
[6,]         0 0.0000000 0.7298514354
[7,]         0 0.0000000 0.6417808504
[8,]         0 0.0000000 0.6325286841
[9,]         0 0.0000000 0.6056734196
[10,]         0 0.0000000 0.5990850652
[11,]         0 0.0000000 0.5888256340
[12,]         0 0.0000000 0.5553105717
[13,]         0 0.0000000 0.5508288669
[14,]         0 0.0000000 0.5316307486
[15,]         0 0.0000000 0.4982445895
[16,]         0 0.0000000 0.4669691522
[17,]         0 0.0000000 0.4237081417
[18,]         0 0.0000000 0.4037730403
[19,]         0 0.0000000 0.3905552052
[20,]         0 0.0000000 0.3536134739
[21,]         0 0.0000000 0.3506098566
[22,]         0 0.0000000 0.3499125985
[23,]         0 0.0000000 0.3342771525
[24,]         0 0.0000000 0.3226769959
[25,]         0 0.0000000 0.2831721623
[26,]         0 0.0000000 0.2566419362
[27,]         0 0.0000000 0.2563665759
[28,]         0 0.0000000 0.2453746961
[29,]         0 0.0000000 0.2255911596
[30,]         0 0.0000000 0.2249212628
[31,]         0 0.0000000 0.2202189756
[32,]         0 0.0000000 0.2037867917
[33,]         0 0.0000000 0.1945505684
[34,]         0 0.0000000 0.1914947438
[35,]         0 0.0000000 0.1891599262
[36,]         0 0.0000000 0.1885084473
[37,]         0 0.0000000 0.1601899013
[38,]         0 0.0000000 0.1572841860
[39,]         0 0.0000000 0.1535638148
[40,]         0 0.0000000 0.1498365298
[41,]         0 0.0000000 0.1437076382
[42,]         0 0.0000000 0.1356457390
[43,]         0 0.0000000 0.1303461110
[44,]         0 0.0000000 0.1287552505
[45,]         0 0.0000000 0.1187793105
[46,]         0 0.0000000 0.1024585911
[47,]         0 0.0000000 0.0977612435
[48,]         0 0.0000000 0.0669924154
[49,]         0 0.0000000 0.0565852775
[50,]         0 0.0000000 0.0342934420
[51,]         0 0.0000000 0.0321241357
[52,]         0 0.0000000 0.0262290459
[53,]         0 0.0000000 0.0227026464
[54,]         0 0.0000000 0.0163487599
[55,]         0 0.0000000 0.0160424249
[56,]         0 0.0000000 0.0119601764
[57,]         0 0.0000000 0.0028189691
[58,]         0 0.0000000 0.0020098180
[59,]         0 0.0000000 0.0011745389
[60,]         0 0.0000000 0.0009556263
[61,]         1 1.3834136 3.4879437913
[62,]         1 0.6845774 1.7386247597
Call:
ripsDiag(X = XX, maxdimension = maxdimension, maxscale = DiagLim,
printProgress = TRUE)

Number of features:
[1] 62

Max dimension:
[1] 1

Scale:
[1] 0 5
```

TDA documentation built on March 30, 2021, 5:10 p.m.