paste_rows_without_zeros: Concatenate cells in each row of a text-based transition...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_basics_v1.R

Description

This is a utility function for make_relprob_txtmatrix_sp1.

Usage

1

Arguments

tmpmat

A cladogenesis/speciation probability matrix (text-based) to collapse each row of.

Details

Convert e.g.:

A|A A|B A|C A|A,B A|B,C A|A,C A|A,B,C
A s j j 0 0 0 0
B 0 j 0 0 0 0 0
C 0 0 j 0 0 0 0
A,B 0 v 0 b1 0 0 0
B,C 0 0 0 0 j 0 0
A,C 0 0 v 0 0 b1 0
A,B,C 0 0 0 0 v 0 b1

...to...

A B C A,B B,C A,C A,B,C
"s+j+j" "j" "j" "v+b1" "j" "v+b1" "v+b1"

Value

tmpcol A list containing each row, concatenated

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

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

Matzke_2012_IBS

See Also

make_relprob_txtmatrix_sp1

Examples

1
2
3
4
5
6
7
8
testval=1

spmat = make_relprob_matrix_bi(states_list=list("_", c("A"),
c("B"), c("C"), c("A","B"), c("B","C"), c("A","C"), c("A","B","C")),
split_ABC=FALSE, splitval="", code_for_overlapping_subsets=NA, printwarn=1)
spmat
tmpcol = paste_rows_without_zeros(tmpmat=spmat)
tmpcol

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.