nFeatures {MSnbase} | R Documentation

## How many features in a group?

### Description

This function computes the number of features in the group defined by the feature variable `fcol` and appends this information in the feature data of `object`.

### Usage

    nFeatures(object, fcol)

### Arguments

`object` | An instance of class `MSnSet`.
`fcol` | Feature variable defining the feature grouping structure.

### Value

An updated `MSnSet` with a new feature variable `fcol.nFeatures`.

### Author(s)

Laurent Gatto

### Examples

    library(pRolocdata)
    data("hyperLOPIT2015ms3r1psm")
    hyperLOPIT2015ms3r1psm <- nFeatures(hyperLOPIT2015ms3r1psm,
                                        "Protein.Group.Accessions")
    i <- c("Protein.Group.Accessions", "Protein.Group.Accessions.nFeatures")
    fData(hyperLOPIT2015ms3r1psm)[1:10, i]

[Package MSnbase version 2.12.0 Index]