fileName <- paste0(system.file(package = "TreeTools"),
"/extdata/input/dataset.nex")
ReadCharacters(fileName)
fileName <- paste0(system.file(package = "TreeTools"),
"/extdata/tests/continuous.nex")
continuous <- ReadCharacters(fileName, encoding = "UTF8")
# To convert from strings to numbers:
at <- attributes(continuous)
continuous <- suppressWarnings(as.numeric(continuous))
attributes(continuous) <- at
continuous
tntFile <- paste0(system.file(package = "TreeTools"),
"/extdata/tests/tnt-xgroup.tnt")
mat <- ReadTntCharacters(tntFile)
attr(mat, "xgroup")
Run the code above in your browser using DataLab