hasSymbols.Alphabet: Check if an Alphabet object has a given set of symbols

Description Usage Arguments Value Author(s) See Also Examples

Description

Check if an Alphabet object has a given set of symbols. Returns true if the class of the object is "AnyAlphabet".

Usage

1
2
## S3 method for class 'Alphabet'
hasSymbols(this, sym, ...)

Arguments

this

An Alphabet object.

sym

A character vector.

...

Not used.

Value

TRUE or FALSE

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Alphabet.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	# create alphabet object
	a<-Alphabet(symbols=c("A","T","G","C"));
	# check if it has the symbols "A" and "G"
	hasSymbols(a,c("A","G"))
	# check if has the symbol "X"
	hasSymbols(a,"X")
	# any alphabet returns true for every symbol
	b<-AnyAlphabet();
	hasSymbols(b,"X")

 

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