Skip to content
Prev 167409 / 398502 Next

data management

? gsub

 >
 > gsub("\\(|\\)", "", var)


You can then read.table on a textConnection.

 > read.table(textConnection(gsub("\\(|\\)", "", var) ))
   V1 V2
1 p1 10
2 p1  3
3 p1  4
4 p2 20
5 p2 30
6 p2 40
7 p3  4
8 p3  1
9 p1  2
On Jan 18, 2009, at 12:13 PM, oscar linares wrote: