Dear all,
I have a vector of filenames which begins like this :
X - c(OrthoP1_DNA_str.aln, OrthoP10_DNA_str.aln,
OrthoP100_DNA_str.aln,
OrthoP101_DNA_str.aln, OrthoP102_DNA_str.aln, OrthoP103_DNA_str.aln,
OrthoP104_DNA_str.aln, OrthoP105_DNA_str.aln, OrthoP106_DNA_str.aln,
OrthoP107_DNA_str.aln)
Try this:
as.numeric(gsub(\\D, , X))
On Fri, May 28, 2010 at 8:21 AM, Joris Meys jorism...@gmail.com wrote:
Dear all,
I have a vector of filenames which begins like this :
X - c(OrthoP1_DNA_str.aln, OrthoP10_DNA_str.aln,
OrthoP100_DNA_str.aln,
OrthoP101_DNA_str.aln, OrthoP102_DNA_str.aln,
Bingo! Thx Gabor.
Thank you too Tal, I looked briefly at the package and it looks like a nice
interface. I keep it in mind for later.
Cheers
Joris
On Fri, May 28, 2010 at 2:25 PM, Gabor Grothendieck ggrothendi...@gmail.com
wrote:
Try this:
as.numeric(gsub(\\D, , X))
On Fri, May 28, 2010
3 matches
Mail list logo