getStates.Sequence: Get the states of a set of Site objects aggregated by a...

Description Usage Arguments Value Author(s) See Also Examples

Description

Get the states of a set of Site objects aggregated by a Sequence object.

Usage

1
2
## S3 method for class 'Sequence'
getStates(this, index, ...)

Arguments

this

A Sequence object.

index

An integer vector specifying a set of positions. It is set to 1:seq$length if omitted.

...

Not used.

Value

A character vector.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Sequence.

Examples

1
2
3
4
5
6
7
8
9
	# create a sequence object
	s<-Sequence(alphabets=list(NucleotideAlphabet()),string="AATTGCCCCCTTGG")
	# get all Site states
	getStates(s)
	# get the states for a collection of sites
	getStates(s,c(1:3,5,8))
	# get states via virtual field
	s$states
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.