clearStates.Sequence: Set the states of a collection of Site objects aggregated by...

Description Usage Arguments Value Author(s) See Also Examples

Description

Set the states of a collection of Site objects aggregated by a Sequence object to undefined (NA).

Usage

1
2
## S3 method for class 'Sequence'
clearStates(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

The Sequence object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Sequence.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	# create a nucleotide sequence
	s<-NucleotideSequence(string="ATGC")
	s
	# set states to NA in the range 2:3
	clearStates(s,2:3)
	s
	# set all states to NA
	clearStates(s)
	s
 

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