[R] strsplit and forward slash '/'

Federico Calboli f.calboli at imperial.ac.uk
Wed Aug 3 18:37:24 CEST 2011


Hi All,

is there a way of using strsplit with a forward slash '/' as the splitting point?

For data such as:

1      T/T    C/C  16/33
2      T/T    C/C  33/36
3      T/T    C/C  16/34
4      T/T    C/C  16/31
5      C/C    C/C  28/29
6      T/T    C/C  16/34

strsplit(my.data[1,1], "/") # and any variation thereof 
Error in strsplit(apoe[1, 1], "/") : non-character argument

Any advice will be gratefully received.

Best wishes,

Federico


--
Federico C. F. Calboli
Department of Epidemiology and Biostatistics
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com



More information about the R-help mailing list