Learn R Programming

phylosim (version 3.0.5)

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

Description

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

Usage

# S3 method for 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).

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# 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
 
# }

Run the code above in your browser using DataLab