【发布时间】:2020-08-04 18:05:13
【问题描述】:
在具有格式标签的文本中,例如
data.frame(id = c(1, 2), text = c("something here <h1>my text</h1> also <h1>Keep it</h1>", "<h1>title</h1> another here"))
有人怎么能用逗号分隔选项只保留<h1> </h1>中的文本:
data.frame(text = c("my text, Keep it", "title"), id = c(1, 2))
【问题讨论】: