Learn R Programming

rtweet (version 1.2.1)

entity: Extract methods

Description

Extract entities of the tweets linked to a tweet id.

Usage

entity(x, entity, ...)

Value

Some information about those entities and the tweet id it comes from. for users mentions the ids of the mentioned users are "user_id", "user_id_str" (not "id_str")

Arguments

x

A tweets object of the rtweet package.

entity

A entity to extract data from.

...

Other possible arguments currently ignored.

Details

The position of where does this occur is not provided.

Examples

Run this code
if (auth_has_default()) {
  statuses <- c(
    "567053242429734913",
    "266031293945503744",
    "440322224407314432"
  )

  ## lookup tweets data for given statuses
  tw <- lookup_tweets(statuses)
  entity(tw, "urls")

}

Run the code above in your browser using DataLab