Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nrow

The number of rows/columns of an array-like object


Description

Return the number of rows or columns present in an array-like object.

NOTE: This man page is for the nrow, ncol, NROW and NCOL S4 generic functions defined in the BiocGenerics package. See ?base::nrow for the default methods (defined in the base package). Bioconductor packages can define specific methods for objects (typically matrix- or array-like) not supported by the default methods.

Usage

nrow(x)
ncol(x)
NROW(x)
NCOL(x)

Arguments

x

A matrix- or array-like object.

Value

A single integer or NULL.

Specific methods defined in Bioconductor packages should behave as consistently as possible with the default methods.

See Also

  • base::nrow for the default nrow, ncol, NROW and NCOL methods.

  • showMethods for displaying a summary of the methods defined for a given generic function.

  • selectMethod for getting the definition of a specific method.

  • nrow,DataFrame-method in the S4Vectors package for an example of a specific nrow method (defined for DataFrame objects).

  • BiocGenerics for a summary of all the generics defined in the BiocGenerics package.

Examples

nrow
showMethods("nrow")
selectMethod("nrow", "ANY")  # the default method

ncol
showMethods("ncol")
selectMethod("ncol", "ANY")  # the default method

NROW
showMethods("NROW")
selectMethod("NROW", "ANY")  # the default method

NCOL
showMethods("NCOL")
selectMethod("NCOL", "ANY")  # the default method

BiocGenerics

S4 generic functions used in Bioconductor

v0.36.1
Artistic-2.0
Authors
The Bioconductor Dev Team
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.