jst_clean_page: Clean a character vector of pages

Description Usage Arguments Value Examples

View source: R/augmentations.R

Description

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

Usage

1

Arguments

page

A character vector for pages.

Value

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

Examples

1
2
3
4
5
6
7
8
9
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".

jstor documentation built on Dec. 11, 2021, 9:56 a.m.