Learn R Programming

tidypmc (version 2.0)

separate_refs: Separate references cited into multiple rows

Description

Separates references cited in brackets or parentheses into multiple rows and splits the comma-delimited numeric strings and expands ranges like 7-9 into new rows

Usage

separate_refs(txt, column = "text")

Value

a tibble

Arguments

txt

a table

column

column name, default "text"

Author

Chris Stubben

Examples

Run this code
x <- data.frame(row = 1, text = "some important studies [7-9,15]")
separate_refs(x)

Run the code above in your browser using DataLab