Learn R Programming

phylosim (version 3.0.5)

getSymbolFreqs.Sequence: Get a table with the frequencies of the states of a collection of Site objects aggregated by a Sequence object

Description

Get a table with the frequencies of the states of a collection of Site objects aggregated by a Sequence object.

Usage

# S3 method for Sequence
getSymbolFreqs(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 table.

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# create a nucleotide sequence
	s<-NucleotideSequence(length=30,processes=list(list(JC69())))
	# sample states
	sampleStates(s)
	# get state frequencies from ranges 1:10 and 20:30
	getSymbolFreqs(s,c(1:10,20:30))
	# get symbol frequencies for the full sequence
	getSymbolFreqs(s)
 
# }

Run the code above in your browser using DataLab