Learn R Programming

JSTORr (version 1.0.20161214)

JSTOR_unpack2grams: Unpack JSTOR journal articles and bibliographic data to a Document Term Matrix of 2-grams

Description

Import journal articles and bibliographic data from the downloaded zipfile and reshape ready for simple text mining. For use with JSTOR's Data for Research datasets (http://dfr.jstor.org/).

Usage

JSTOR_unpack2grams(path = getwd())

Arguments

path
full path to directory containing 'bigrams' folder and the citations.CSV file. These are obtained after unzipping the file downloaded from DfR (you should unzip the file before running this function). Default is the working directory.

Value

Returns a list of two items. First is "bigrams", a Document Term Matrix of 2-grams, and second is 'bibliodata', a data frame of bibliographic information for all articles.

Examples

Run this code
## unpack2grams <- JSTOR_unpack2grams(path = "C:/Users/marwick/Downloads/JSTOR") 
# then follow prompts to navigate to the location of the zipfile

Run the code above in your browser using DataLab