Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在twitteR参数中获取TredN“;“哇;缺少,没有默认值_R - Fatal编程技术网

无法在twitteR参数中获取TredN“;“哇;缺少,没有默认值

无法在twitteR参数中获取TredN“;“哇;缺少,没有默认值,r,R,我想使用“推特”软件包了解趋势。当我键入searchTwitter(“0”时,它工作。但是,当我键入getTrends(period=“”)时,它显示:getTrends中的错误(period=“weekly”): 缺少参数“woeid”,没有默认值 如何解决此问题?woeid指定位置,以便提取给定地点/国家/地区的趋势。要获取全球趋势,可以使用getTrends(1) 要查找所需的woeid,可以使用以下函数: a_trends = availableTrendLocations() head

我想使用“推特”软件包了解趋势。当我键入searchTwitter(“0”时,它工作。但是,当我键入getTrends(period=“”)时,它显示:getTrends中的错误(period=“weekly”): 缺少参数“woeid”,没有默认值
如何解决此问题?

woeid指定位置,以便提取给定地点/国家/地区的趋势。要获取全球趋势,可以使用
getTrends(1)
要查找所需的woeid,可以使用以下函数:

a_trends = availableTrendLocations()
head(a_trends) 
或:


查看帮助
?searchTwitter
,where is表示woeid:一个描述位置的数字标识码,一个Yahoo!where On Earth ID。然后,我会尝试在这里:
 closeTrends = closestTrendLocations(your_lon, your_lat)
 head(closeTrends)