x<-matrix(c("?","A","C","g","t","-","0","1","2","3","4","5"),4,6)
rownames(x)<-c("seq1","seq2","seq3","seq4")
x<-as.dna(x)
# original character matrix
as.matrix(x)
## Coercing a 'Dna' object to a numeric matrix.
# numeric matrix
as.numeric(x)
Run the code above in your browser using DataLab