Re: [R-sig-phylo] subset DNAbin

2016-09-05 Thread Liam J. Revell
Hi Kirston. Note that read.fas is in the package ips. This solution will work only if your sequences are all of the same length, in which case your sequences are stored in a matrix & the same result would be obtained using: obj<-read.dna("filename",format="fasta") obj<-obj[grep("1101",rowname

Re: [R-sig-phylo] subset DNAbin

2016-09-04 Thread Andreas Kolter
Hello Kirston, try this: x <- read.fas("example.fasta") y <- x[grep("1011",rownames(x)),] Greetings, Andreas Am 2016-09-05 08:07, schrieb Kirston Barton: Hi, I have my data in a fasta file and am importing it into R using read.dna, which creates a DNAbin matrix object. I would like to subset