I’m hoping some R wizard can help me. I’ve constructed distance matrices in mother (yeah for repeated subsampling capability) and now need to use them in R for further analyses. I can get the lower triangle data in but not the labels using which I modified from Unifrac Distance Matrix -> Newick using R

Code: Select all

b_bc <- data.matrix(read.table("", fill=T, row.names=1, skip=1, col.names=1:<#samples>))

I don't get any errors, just don't have the sample labels associated with the data. I've played with the row.names/col.names variable. And, thinking that the problem was related to the lower triangle data form, reran the dist in mothur to get a square matrix but still can't get the labels to be associated with the matrix. do I need to bring the sample names in as a vector then associate that vector with the matrix?

ETA: oh actually something’s not quite right when I load it into R, I get an N x N-1 matrix. Anyone?