Produces result summaries.

# S4 method for AbundanceMatrix
summary(object, ...)

Arguments

object

An AbundanceMatrix object.

...

Currently not used.

Value

An AbundanceSummary object.

See also

Other mutators: mutators, subset()

Author

N. Frerebeau

Examples

## Create a data.frame
X <- matrix(data = sample(0:10, 50, TRUE), nrow = 10, ncol = 5)
Y <- as.data.frame(X)

## Coerce to a count matrix
Z <- as_count(Y)

## Set/get groups
set_samples(Z) <- rep(c("a", "b", "c", "d", "e"), each = 2)
get_samples(Z)
#>  [1] "a" "a" "b" "b" "c" "c" "d" "d" "e" "e"

## Set/get groups
set_groups(Z) <- rep(c("A", "B"), each = 5)
get_groups(Z)
#>  [1] "A" "A" "A" "A" "A" "B" "B" "B" "B" "B"

## Get/get TPQ/TAQ
chrono <- list(
  tpq = sample(1301:1400, 10, replace = TRUE),
  taq = sample(1451:1500, 10, replace = TRUE)
)
set_terminus(Z) <- chrono
get_terminus(Z)
#>        tpq  taq
#> row1  1355 1466
#> row2  1329 1500
#> row3  1340 1471
#> row4  1373 1474
#> row5  1390 1488
#> row6  1375 1459
#> row7  1391 1460
#> row8  1399 1451
#> row9  1369 1457
#> row10 1387 1454

## Collection of features
as_features(Z)
#>       V1 V2 V3 V4 V5 samples group dates  tpq  taq
#> row1   5  6  2  0  6       a     A    NA 1355 1466
#> row2   4  0  2  2  5       a     A    NA 1329 1500
#> row3   0  5 10  6  8       b     A    NA 1340 1471
#> row4   4  9  8  3  7       b     A    NA 1373 1474
#> row5  10  0  2  0  7       c     A    NA 1390 1488
#> row6   1  6  7  9  8       c     B    NA 1375 1459
#> row7   2  1  3  4  5       d     B    NA 1391 1460
#> row8   1  6  9  0 10       d     B    NA 1399 1451
#> row9   9  3  8  0  0       e     B    NA 1369 1457
#> row10  4  6  7  9  8       e     B    NA 1387 1454

## Summarize data
summary(Z)
#> <AbundanceSummary: 10 x 5>
#> A ------------------------------------------------------------------------------
#> * Observations: 5
#> * Variables: 5
#> * Replicated measurements: TRUE
#> * Chronology: 1329 - 1500 (year CE)
#> B ------------------------------------------------------------------------------
#> * Observations: 5
#> * Variables: 5
#> * Replicated measurements: TRUE
#> * Chronology: 1369 - 1460 (year CE)
#> --------------------------------------------------------------------------------