length-methods: Methods for function 'length' in the package 'haplotypes'

Description Usage Arguments Value Methods See Also Examples

Description

Methods for function length.

Usage

1
2
3
4
5
6
## S4 method for signature 'Dna'
length(x)
## S4 method for signature 'Haplotype'
length(x)
## S4 method for signature 'Parsimnet'
length(x)

Arguments

x

an object of class Dna, Haplotype or Parsimnet.

Value

returns a non-negative integer vector.

Methods

signature(x = "Dna")

returns the longest sequence length.

signature(x = "Haplotype")

returns the number of haplotypes.

signature(x = "Parsimnet")

returns the length of network(s).

See Also

ncol-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data("dna.obj")
x<-dna.obj

## Longest sequence length
length(x)


## Total number of haplotypes
h<-haplotype(x)
length(h)

## Length of network(s)
p<-parsimnet(x,prob=.95)
# length of the network
length(p)
 
p<-parsimnet(x,prob=.99)
# length of the networks
length(p)

haplotypes documentation built on Feb. 28, 2020, 5:08 p.m.