nsamples {phyloseq} | R Documentation

## Get the number of samples.

### Description

Get the number of samples.

### Usage

    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

    #
    data("esophagus")
    tree <- phy_tree(esophagus)
    OTU1 <- otu_table(esophagus)
    nsamples(OTU1)
    physeq1 <- phyloseq(OTU1, tree)
    nsamples(physeq1)

[Package phyloseq version 1.38.0 Index]