Learn R Programming

phylosim (version 3.0.5)

deleteSubSequence.Sequence: Delete a collection of sites aggregated by a Sequence object

Description

Delete a collection of sites aggregated by a Sequence object.

Usage

# S3 method for Sequence
deleteSubSequence(this, index, ...)

Arguments

this

A Sequence object.

index

An index vector specifying a collection of sites to be deleted. It is set to 1:seq$length if omitted.

...

Not used.

Value

Invisible TRUE or errror.

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# create a nucleotide sequence
	s<-NucleotideSequence(string="ATATATATATATATAT")
	# delete sites 2, 4 and 6
	deleteSubSequence(s,c(2,4,6))
	s
	# delete sites in the range 3:6
	deleteSubSequence(s,3:6)
	s
 
# }

Run the code above in your browser using DataLab