## All Citations
x <- c("Hello World (V. Raptor, 1986) bye",
"Narcissism is not dead (Rinker, 2014)",
"The R Core Team (2014) has many members.",
paste("Bunn (2005) said, \"As for elegance, R is refined, tasteful, and",
"beautiful. When I grow up, I want to marry R.\""),
"It is wrong to blame ANY tool for our own shortcomings (Baer, 2005).",
"Wickham's (in press) Tidy Data should be out soon.",
"Rinker's (n.d.) dissertation not so much.",
"I always consult xkcd comics for guidance (Foo, 2012; Bar, 2014).",
"Uwe Ligges (2007) says, \"RAM is cheap and thinking hurts\""
)
rm_citation(x)
rm_citation(x, extract=TRUE)
rm_citation(x, replacement="[CITATION HERE]")
qdapTools::vect2df(sort(table(unlist(rm_citation(x, extract=TRUE)))),
"citation", "count")
## In-Text
rm_citation(x, extract=TRUE, pattern="@rm_citation2")
## Parenthetical
rm_citation(x, extract=TRUE, pattern="@rm_citation3")Run the code above in your browser using DataLab