ncol-methods {haplotypes} | R 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 |
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
Examples
data("dna.obj")
x <-dna.obj
## Giving the length of the longest sequence.
ncol(x)
# gives the same result
length(x)
[Package haplotypes version 1.1.3.1 Index]