text
:screenName
:id
:replyToSN
:replyToUID
:statusSource
:created
:truncated
:favorited
:retweeted
:retweetCount
:toDataFrame
:data.frame
, with each field representing a column.
This can also be accomplished by the S4 style
as.data.frame(objectName)
.status
class is implemented as a reference class. This class
was previously implemented as an S4 class, and for backward
compatibility purposes the old S4 accessor methods have been left in,
although new code should not be written with these. 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 statusFactory
. Accessor set & get
methods are provided for every field using reference class
$accessors()
methodology (see setRefClass
for
more details). As an example, the screenName
field could be
accessed using object$getScreenName
and
object$setScreenName
.The constructor of this object assumes that the user is passing in a JSON encoded Twitter status. It is also possible to directly pass in the arguments.
userTimeline
, setRefClass
## Not run:
# st <- statusFactory$new(screenName="test", text="test message")
# st$getScreenName()
# st$getText()
#
# ## Assume 'json' is the return from a Twitter call
# st <- statusFactory$new(json)
# st$getScreenName()
# ## End(Not run)
Run the code above in your browser using DataLab