copySubSequence.Sequence: Copy a collection of Site objects aggregated by a Sequence...

Description Usage Arguments Value Author(s) See Also Examples

Description

Copy a collection of Site objects aggregated by a Sequence object into a new Sequence object.

Usage

1
2
## S3 method for class 'Sequence'
copySubSequence(this, index, process=NA, ...)

Arguments

this

A Sequence object.

index

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

process

The Process object performing the copy (optional).

...

Not used.

Value

A new Sequence object.

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 nucleotide sequence
	s<-NucleotideSequence(string="ATATATATATATATATA")
	# copy sites in the range 3:8 in a new object
	s2<-copySubSequence(s,3:8)
	s2
	# copy sites 1,3 and 5 from s2
	s3<-copySubSequence(s2,c(1,3,5))
	s3
 

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