Learn R Programming

jstor (version 0.3.11)

jst_clean_page: Clean a character vector of pages

Description

This function tries to convert character vectors into integers. This function should not be called on page ranges.

Usage

jst_clean_page(page)

Value

An integer vector, cleaned and converted from the input vector.

Arguments

page

A character vector for pages.

Examples

Run this code
jst_clean_page("2")

# anything that is not a digit gets removed
jst_clean_page("A2-")

# a weird format from the American Journal of Sociology is convered correctly
jst_clean_page("AJSv104p126")
# this is done by searching for "p", and if it is found, extracting the
# content after "p".

Run the code above in your browser using DataLab