searchTwitter(twitteR)
searchTwitter()所属R语言包:twitteR
Search twitter
搜索Twitter
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function will issue a search of Twitter based on a supplied search string.
此功能会发出的Twitter搜索的基础上提供的搜索字符串。
用法----------Usage----------
searchTwitter(searchString, n=25, lang=NULL, since=NULL, until=NULL,
locale=NULL, geocode=NULL, sinceID=NULL, ...)
Rtweets(n=25, lang=NULL, since=NULL, ...)
参数----------Arguments----------
参数:searchString
Search query to issue to twitter
发出叽叽喳喳的搜索查询
参数:n
The maximum number of tweets to return
返回的最大的tweet数量
参数:lang
If not NULL, restricts tweets to the given language, given by an ISO 639-1 code
如果不是NULL,限制给定的语言,通过ISO 639-1代码的鸣叫
参数:since
If not NULL, restricts tweets to those since the given date. Date is to be formatted as YYYY-MM-DD
如果没有NULL,因为给定的日期限制鸣叫。日期格式为YYYY-MM-DD
参数:until
If not NULL, restricts tweets to those up until the given date. Date is to be formatted as YYYY-MM-DD
如果没有NULL,限制那些起来的鸣叫,直到给定的日期。日期格式为YYYY-MM-DD
参数:locale
If not NULL, will set the locale for the search. As of 03/06/11 only ja is effective, as per the Twitter API
如果没有NULL,把场景设置的搜索。截至03/06/11唯一的ja是有效的,按照Twitter的API
参数:geocode
If not NULL, returns tweets by users located within a given radius of the given latitude/longitude. See Details below for more information
如果非NULL,退货推特用户在给定的半径定纬度/经度。 Details下面的更多信息,
参数:sinceID
If not NULL, returns tweets with IDs greater (ie newer) than the specified ID
如果不是NULL,返回鸣叫用的ID更大(即新)超过指定的ID
参数:...
Optional arguments to be passed to getURL
可选参数传递给getURL
Details
详细信息----------Details----------
These commands will return any authorized tweets which match the search criteria. Note that there are pagination restrictions as well as other limits on what can be searched, so it is always possible to not retrieve as many tweets as was requested with the n argument. Authorized tweets are public tweets as well as those protected tweets that are available to the user after authenticating via registerTwitterOAuth.
这些命令将返回符合搜索条件的任何授权的鸣叫。需要注意的是有的分页限制以及其他限制可以搜索,这样它总是不获取尽可能多的鸣叫,n参数要求。授权鸣叫是公开的鸣叫以及那些受保护的tweet消息,提供给用户进行身份验证后通过registerTwitterOAuth。
For the geocode argument, the values are given in the format latitude,longitude,radius, where the radius can have either mi (miles) or km (kilometers) as a unit. For example geocode='37.781157,-122.39720,1mi'.
geocode参数的值给定的格式“latitude,longitude,radius,半径可以有mi(英里)或km(公里)为单位。例如geocode='37.781157,-122.39720,1mi'。
For the sinceID argument, if the requested ID value is older than the oldest available tweets, the API will return tweets starting from the oldest ID available.
对于sinceID参数,如果所请求的ID值是年纪比现有最古老的鸣叫,API将返回鸣叫从最古老的ID。
The Rtweets function is a wrapper around searchTwitter which hardcodes in a search for #rstats.
Rtweets函数是一个包装周围searchTwitter*在搜索#rstats。
值----------Value----------
A list of status objects
status对象列表
(作者)----------Author(s)----------
Jeff Gentry
参见----------See Also----------
status, registerTwitterOAuth
status,registerTwitterOAuth
实例----------Examples----------
searchTwitter("#beer", n=100)[啤酒“,N = 100)]
Rtweets(n=37)
## Search between two dates[#两个日期之间的搜索]
searchTwitter('charlie sheen', since='2011-03-01', until='2011-03-02')
## geocoded results[#GEO编码结果]
searchTwitter('patriots', geocode='42.375,-71.1061111,10mi')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|