ncol-methods: Returns the length of the longest DNA sequence

ncol-methodsR Documentation

Returns the length of the longest DNA sequence

Description

ncol returns the number of columns present in a matrix.

Usage

## S4 method for signature 'Dna'
ncol(x)

Arguments

x

an object of class Dna.

Value

an integer of length one.

Methods

signature(x = "Dna")

ncol returns the number of columns present in the sequence matrix (length of the longest DNA sequence).

See Also

length-methods

Examples

data("dna.obj")
x <-dna.obj

## Giving the length of the longest sequence.
ncol(x) 
# gives the same result
length(x) 

haplotypes documentation built on July 26, 2023, 5:22 p.m.