I need to add a new line after the ;
. My data looks like this:
(1,60112_486_100_xxx_BS);(1,1_486_100_yyy_TE);
I need:
(1,60112_486_100_xxx_BS);
(1,1_486_100_yyy_TE);
How can I achieve this?
tobiasegli_te
A command line tool like sed (How to replace space with comma using sed?) seems more suitable for this job.
If you really want to to this in R, you could use e.g. yourData <- readLines(...)
and gsub(");",");\n",yourData)
来源:https://stackoverflow.com/questions/40082473/adding-new-line-in-r