我有以下句子,其中\ n出现字符
Get to 6 month rolling\nemail (from 13 months)\n\nOngoing work with Firm...
我需要删除连续两个中的一个,所以输出应该如下:
Get to 6 month rolling\nemail (from 13 months)\nOngoing work with Firm...
这样\ n \ n正在进行看起来像\ n正在进行中。在R中有什么简单的方法吗。非常感谢提前
答案 0 :(得分:0)
这是
之一> gsub("\n\n", "\n", "Get to 6 month rolling\nemail (from 13 months)\n\nOngoing work with Firm")
[1] "Get to 6 month rolling\nemail (from 13 months)\nOngoing work with Firm"