【发布时间】:2017-09-28 20:31:25
【问题描述】:
我正在尝试在 R 中按段落拆分文档
test.text <- c("First paragraph. Second sentence of 1st paragraph.
Second paragraph.")
# When we run the below, we see separation of \n\n between the 2nd and 3rd sentences
test.text
# This outputs the desired 2 blank lines in the console
writeLines("\n\n")
a <- strsplit(test.text, "\\n\\n")
它没有正确拆分。
【问题讨论】: