if (FALSE) {
require(Claddis)
## Ordinating the distance matrix of Claddis example data
Claddis.ordination(Claddis::michaux_1989)
## Creating simple discrete morphological matrix (with polymorphisms)
cat(
"#NEXUS
BEGIN DATA;
DIMENSIONS NTAX=5 NCHAR=5;
FORMAT SYMBOLS= \" 0 1 2\" MISSING=? GAP=- ;
MATRIX
t1 {01}1010
t2 02120
t3 1210(01)
t4 01111
t5 00101
;
END;", file = "morpho_matrix.nex")
## Ordinating the matrix (using a distance matrix)
Claddis.ordination("morpho_matrix.nex")
## Only converting the nexus matrix into a Claddis format
Claddis_data <- Claddis.ordination("morpho_matrix.nex", distance = NULL)
file.remove("morpho_matrix.nex")
}
Run the code above in your browser using DataLab