t2DataFrame: Parse tweets from JSON files and import to R

Description Usage Arguments Value Author(s) See Also Examples

Description

A function to parse JSON files containing tweets stored using the function tweet2r. Tweets are stored as a data.frame ready to be use within R.

Usage

1
t2DataFrame(fileprefix, path = ".", pattern = ".json$")

Arguments

fileprefix

File prefix for JSON files where tweets has been stored after harvesting. If tweets have been retrieved with the tweet2r function it should be the same fileprefix name.

path

A character vector to folder. see ?list.files()

pattern

Limits possible file extensions, optional as regular expression. see ?list.files()

Value

tweets

Return harvested tweets with tweet2r as a data.frame.

Author(s)

Pau Aragó Galindo parago@uji.es

See Also

tweet2r, streamR

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

  #json file prefix names
  fileprefix="tweets"
  
  #function to parse tweets from JSON file and import to R
  tweets<-t2DataFrame(fileprefix)
  
## End(Not run)

tweet2r documentation built on May 2, 2019, 2:34 a.m.