[R] Regular expressions & sub

From: Bernd Weiss <bernd.weiss_at_uni-koeln.de>
Date: Fri 19 Aug 2005 - 02:10:14 EST


Dear all,

I am struggling with the use of regular expression. I got

> as.character(test$sample.id)

 [1] "1.11" "10.11" "11.11" "113.31" "114.2" "114.3" "114.8"

and need

[1] "11" "11" "11" "31" "2" "3" "8"

I.e. remove everything before the "." .

TIA, Bernd



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 19 02:16:48 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:53 EST