Description Usage Arguments Details Value Author(s) Examples
View source: R/EmbiggenMatrix.R
Given a cladistic matrix, will duplicate each block of characters N times.
1 | EmbiggenMatrix(CladisticMatrix, N)
|
CladisticMatrix |
A cladistic matrix in the format imported by |
N |
The number of times to duplicate the data. |
Given a cladistic matrix in the format imported by Claddis::read_nexus_matrix
will duplicate each block N times. Thus if a block contains 10 characters and N is 5 the resulting block will have 50 characters total.
This function exists for internal use in the Metatree function as a means of upweighting MRP data beyond the limits of TNT (maximum weight 1000) by duplicating blocks. However, it is also made available for individual use here.
A cladistic matrix in the format imported by Claddis::read_nexus_matrix
.
Graeme T. Lloyd graemetlloyd@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Build an example matrix of six species and four characters:
ExampleMatrix <- Claddis::build_cladistic_matrix(matrix(as.character(c(0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)),
nrow = 6, dimnames = list(LETTERS[1:6], c()), byrow = TRUE))
# Inspect starting matrix:
ExampleMatrix$matrix_1$matrix
# Duplicate block five times (20 characters):
ExampleMatrix <- EmbiggenMatrix(ExampleMatrix, 5)
# Inspect matrix to check it now contains 20 characters:
ExampleMatrix$matrix_1$matrix
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.