Skip to contents

jstor includes several sample files for demonstration purposes. This helper makes them easy to access.

Usage

jst_example(path = NULL)

Arguments

path

Name of the example file. If NULL, the example files will be listed.

Value

Either a character vector with the names of example files (if jst_example() is called without supplying an argument), or a character vector indicating the path to the example file.

Details

The code for this function was adapted from the package readr.

Examples

jst_example()
#> [1] "article_with_footnotes.xml"  "article_with_references.xml"
#> [3] "book.xml"                    "full_text.txt"              
#> [5] "ngram.txt"                   "parsed_references.xml"      
#> [7] "pseudo_dfr.zip"             
jst_example("article_with_references.xml") 
#> [1] "/usr/local/lib/R/site-library/jstor/extdata/article_with_references.xml"