Learn R Programming

BioGeoBEARS (version 0.2.1)

nullsym_to_NA: Convert a specified null range code to NA

Description

Takes a matrix mat, converts any instances of the nullsym symbol to NA.

Usage

nullsym_to_NA(mat, nullsym = "-")

Arguments

mat
A matrix.
nullsym
A character specifying the null symbol.

Value

mat The revised matrix

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

remove_null_rowcols_from_mat

Examples

Run this code
testval=1
mat = matrix(c("-",1,1,1,"-",1,1,1,"-"), nrow=3)
mat
mat2 = nullsym_to_NA(mat, nullsym="-")
mat2

Run the code above in your browser using DataLab