[R] substring if a record has a "\"

Mat matthias.weber at fnt.de
Fri May 2 09:17:15 CEST 2014


Hello togehter, 

i have a litte problem. I have a data.frame with a view entries like this
one:
      1
A   Marius Muller -\nIT Services
B   Rockwood\nBrockhues
C   Microlog Services\nMarcos
D   Firefox Services

I now want only the first description in the column until the "\n". How can
i do this?

The solution look like this one:

      1
A   Marius Muller -
B   Rockwood
C   Microlog Services
D   Firefox Services

Thank you.

Best regards. Mat.



--
View this message in context: http://r.789695.n4.nabble.com/substring-if-a-record-has-a-tp4689857.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list