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")

 


Search within the phylosim package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.