[R-sig-phylo] Converting from DNAbin to a matrix

2011-04-07 Thread Josh B
Dear Listserve, I have a seemingly simple problem that I cannot figure out. I would like to convert an element of class DNAbin to a matrix. Consider the example from the read.dna help file: cat(3 40, No305 NTTCGACACACCCACTACTNTTATCAGTCACT, No304

Re: [R-sig-phylo] Converting from DNAbin to a matrix

2011-04-07 Thread Liam J. Revell
Hi Josh, Try doing this when you read in the data: ex.dna-read.dna(exdna.txt,format=sequential,as.character=T) This will return an object of class matrix instead of a DNAbin object. The elements in the matrix should just be the letters from your input file. There may be a better way to do