Hello,
I have a vector that contains some elements with concatenated values, such as:
```
> vect
[1] "name_1"
[2] "name_2"
[3] "name_3\nsurname_3"
[4] "some other text\netc"
```
How can I create a new vector where each component is an element, such as:
```
> vect
[1] "name_1"
[2] "name_2"
[3] "name_3"
[4] "surname_3"
[5] "some other text"
[6] "etc"
```
I can split the elements on '\n' but how do I transfer these directly
on a new vector?
Thanks

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to