[R] question about string handling....

karena dr.jzhou at gmail.com
Wed Jul 14 20:21:56 CEST 2010


Hi, 

I have a data.frame as following:
var1         var2
1           ab_c_(ok)
2           okf789(db)_c
3           jojfiod(90).gt
4           "ij"_(78)__op
5           (iojfodjfo)_ab

what I want is to create a new variable called "var3". the value of var3 is
the content in the Parentheses. so var3 would be:
var3
ok
db
90
78
iojfodjfo

how to do this?

thanks,

karena
-- 
View this message in context: http://r.789695.n4.nabble.com/question-about-string-handling-tp2289178p2289178.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list