ExtractorTwtid | R Documentation |
This class inherits from the Instance
class and
implements the functions of extracting the text and the date of an twtid type
file.
Twitter connection is handled through the Connections
class
which loads the Twitter API credentials from the bdpar.Options
object.
Additionally, to increase the processing speed, each twitter query is stored
in a cache to avoid the execution of duplicated queries. To enable this option,
cache location should be in the "cache.twitter.path" field of
bdpar.Options
variable. This variable has to be the
path to store the tweets and it is necessary that it has two folder named:
"_spam_" and "_ham_"
This class inherits from Instance
and implements the
obtainSource
and obtainDate
abstracts functions.
bdpar::Instance
-> ExtractorTwtid
bdpar::Instance$addBanPipes()
bdpar::Instance$addFlowPipes()
bdpar::Instance$addProperties()
bdpar::Instance$checkCompatibility()
bdpar::Instance$getBanPipes()
bdpar::Instance$getData()
bdpar::Instance$getDate()
bdpar::Instance$getFlowPipes()
bdpar::Instance$getNamesOfProperties()
bdpar::Instance$getPath()
bdpar::Instance$getProperties()
bdpar::Instance$getSource()
bdpar::Instance$getSpecificProperty()
bdpar::Instance$invalidate()
bdpar::Instance$isInstanceValid()
bdpar::Instance$isSpecificProperty()
bdpar::Instance$setData()
bdpar::Instance$setDate()
bdpar::Instance$setProperties()
bdpar::Instance$setSource()
bdpar::Instance$setSpecificProperty()
new()
Creates a ExtractorTwtid
object.
ExtractorTwtid$new(path, cachePath = NULL)
path
A character
value. Path of the twtid file.
cachePath
A character
value. Path of the cache
location. If it is NULL, checks if is defined in the
"cache.twitter.path" field of bdpar.Options
variable.
obtainId()
Obtains the ID of an specific tweet. Reads the ID of the file indicated in the variable path.
ExtractorTwtid$obtainId()
getId()
Gets the ID of an specific tweet.
ExtractorTwtid$getId()
Value of tweet ID.
obtainDate()
Obtains the date from a specific tweet ID. If the tweet has been previously cached the tweet date is loaded from cache path. Otherwise, the request is performed using Twitter API and the date is automatically formatted to "
ExtractorTwtid$obtainDate()
obtainSource()
Obtains the source from a specific tweet ID. If the tweet has previously been cached the source is loaded from cache path. Otherwise, the request is performed using on Twitter API.
ExtractorTwtid$obtainSource()
toString()
Returns a character
representing the instance
ExtractorTwtid$toString()
Instance
character
representation
clone()
The objects of this class are cloneable with this method.
ExtractorTwtid$clone(deep = FALSE)
deep
Whether to make a deep clone.
bdpar.Options
, Connections
,
ExtractorEml
, ExtractorSms
,
ExtractorYtbid
, Instance
,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.