Learn R Programming

PhylogeneticEM (version 1.0.0)

merge_complementary_vectors: Merge several complementary vectors into one.

Description

merge_complementary_vectors take several vectors with complementary entries (i.e, vector of same length, that are such that only one vector has a non NA value for each entry), and merge them into one.

Usage

merge_complementary_vectors(comb, mat)

Arguments

comb
vector giving the rows to be kept.
mat
matrice containing the vectors as rows.

Value

row vector of the same size as entry matrix.

Details

The vectors are selected from the entry matrix by comb. At each entry, the vectors are added using function add_complementary.