nsamples-methods: Get the number of samples.

Description Usage Arguments Value See Also Examples

Description

Get the number of samples.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
nsamples(physeq)

## S4 method for signature 'ANY'
nsamples(physeq)

## S4 method for signature 'phyloseq'
nsamples(physeq)

## S4 method for signature 'otu_table'
nsamples(physeq)

## S4 method for signature 'sample_data'
nsamples(physeq)

Arguments

physeq

A phyloseq-class, sample_data, or otu_table-class.

Value

An integer indicating the total number of samples.

See Also

taxa_names, sample_names, ntaxa

Examples

1
2
3
4
5
6
7
#
data("esophagus")
tree <- phy_tree(esophagus)
OTU1 <- otu_table(esophagus)
nsamples(OTU1)
physeq1 <- phyloseq(OTU1, tree)
nsamples(physeq1)

Example output

[1] 3
[1] 3

phyloseq documentation built on Nov. 8, 2020, 6:41 p.m.