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
Run the code above in your browser using DataLab