[英]Search_tweets() (rtweet package) does not return all expected columns
I'm using the rtweet package and it's not returning the database with all columns with the search_tweets() function.我正在使用 rtweet 包,它没有使用 search_tweets() 函数返回包含所有列的数据库。 The database has only 35 columns and no columns "screen_name" and "mentions_screen_name".数据库只有 35 列,没有列“screen_name”和“mentions_screen_name”。 Please how to get the rest of the columns?请问如何获得其余的列? Below an example the columns returned.下面的示例列返回。
tweets.df <- search_tweets("science") tweets.df <- search_tweets("科学")
names(tweets.df)名称(推文.df)
[1] "created_at" "id"
[3] "id_str" "full_text"
[5] "truncated" "display_text_range"
[7] "entities" "metadata"
[9] "source" "in_reply_to_status_id"
[11] "in_reply_to_status_id_str" "in_reply_to_user_id"
[13] "in_reply_to_user_id_str" "in_reply_to_screen_name"
[15] "geo" "coordinates"
[17] "place" "contributors"
[19] "is_quote_status" "retweet_count"
[21] "favorite_count" "favorited"
[23] "retweeted" "possibly_sensitive"
[25] "lang" "retweeted_status"
[27] "quoted_status_id" "quoted_status_id_str"
[29] "quoted_status" "text"
[31] "favorited_by" "display_text_width"
[33] "quoted_status_permalink" "query"
[35] "possibly_sensitive_appealable"
You seem to have installed the development version of rtweet 0.7.0 < rtweet > 1.0.0 which is not released yet on CRAN.您似乎已经安装了尚未在 CRAN 上发布的 rtweet 0.7.0 < rtweet > 1.0.0 的开发版本。 Could you post the packageVersion("rtweet")
output?你能发布packageVersion("rtweet")
输出吗?
The devel version of rtweet returns only the columns returned by the API but the user information is retrieval via users_data(tweets.df)
. rtweet 的开发版本仅返回 API 返回的列,但用户信息是通过users_data(tweets.df)
检索的。 There you will find the id and screen name of the user who posted the tweets.在那里,您将找到发布推文的用户的 ID 和屏幕名称。 The previous mentions_screen_name
is the in_reply_to_screen_name
column.前面的mentions_screen_name
是in_reply_to_screen_name
列。 Please make sure that you read the documentation of the version you are using请确保您阅读了您正在使用的版本的文档
This is the version这是版本
packageVersion("rtweet") [1] '0.7.0' packageVersion("rtweet") [1] '0.7.0'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.