trend-class(twitteR)
trend-class()所属R语言包:twitteR
Class "trend": A class to represent Twitter trends
“潮流”类:A类来表示Twitter趋势
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Provides a model representing trends from Twitter
提供了一个模型,代表来自Twitter的发展趋势
Details
详细信息----------Details----------
The trend class is implemented as a reference class. As there should be no backwards compatibility issues, there are no S4 methods provided as with the user and status classes. An instance of a generator for this class is provided as a convenience to the user as it is configured to handle most standard cases. To access this generator, use the object trendFactory. Accessor set & get methods are provided for every field using reference class $accessors() methodology (see setRefClass for more details). As an example, the date field could be accessed using object$getDate() and object$setDate().
trend作为参考类类实现。应该没有向后的兼容性问题,有没有S4user和status类提供的方法。这个类的一个实例生成器,用于提供给用户一个方便,因为它被配置为处理最标准的情况下。要访问此生成器,使用对象trendFactory。访问器组和get方法为各个领域提供使用引用类$accessors()方法(见setRefClass为更多细节)。作为一个例子,date域可以访问使用object$getDate()和object$setDate()。
字段----------Fields----------
name: Name of the trend
name:名称的趋势
date: POSIXct representation of the date
date:POSIXct表示的日期
promoted_content: Logical, if this was promoted by
promoted_content:逻辑,如果这是促进
events: Appears to be unused by Twitter
events:看来是未使用的由Twitter
woeid: Yahoo based location code, currently
woeid:雅虎基于位置的代码,目前
country: Country associated with the trend, currently
country:国家与趋势相结合,目前
countryCode: Country code associated with the trend,
countryCode:国家代码与趋势相结合,
方法----------Methods----------
toDataFrame: Converts this into a one row data.frame, with each field representing a column. This can also be accomplished by the S4 style
toDataFrame:将其转换成一排data.frame,每个字段表示列。这也可以通过S4的风格
(作者)----------Author(s)----------
Jeff Gentry
参见----------See Also----------
getTrends, setRefClass
getTrends,setRefClass
实例----------Examples----------
## It is suggested that one does not call the constructor directly,[#这是建议,不直接调用构造函数,]
## but if desired this is the appropriate structure[#,但如果需要的话,这是适当的结构]
zz <- trendFactory$new(name='foo', date=Sys.Date())
zz$getName()
## Instead, use getTrends:[#而不是中,使用getTrends:]
xx <- getTrends()
xx[[1]]$getName()
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|