【发布时间】:2018-06-12 15:34:23
【问题描述】:
我只想将我的数据框的一个特定列(即第三列 C)读取为文本,并创建一个词云。让df=
A B C
1 2 sheep
2 2 sheep
3 4 goat
4 5 camel
5 2 camel
6 1 camel
我尝试从readLines(df$C) 读取Lines,但出现以下错误:
Error in readLines(df$C) :
'con' is not a connection
【问题讨论】:
-
你不想要
df$C吗? -
如果您已经将其作为数据框,
df$C不会得到您想要的吗? -
readLines用于从文件中读取信息行。如果我理解正确,您已经有一个数据框,因此您无需在会话中读取任何内容