crossref_authors: Create data.frame with authors from crossref

Description Usage Arguments Details Value References Examples

View source: R/crossref_authors.R

Description

This function builds on rcrossref cr_works. It takes a data.frame and extracts the 'author' list column into a data.frame with one author per line and a new 'full_name' column (family, given).

Usage

1

Arguments

data

x$author. The author list in a data.frame produced by get_crossref

source

The source crossref data.frame name (unquoted) produced as output by get_crossref.

.id

This must be the DOI field from the source crossref data.frame as x$DOI (unquoted).

Details

A data.frame of results from crossref (see get_crossref ) containing an author column in list format with author family and given names. This function extracts authors one per row per DOI. The DOI from the source table serves as the index. The extracted author data is joined with the data in the source table using dplyr leftjoin to create a new data.frame with an author name per row per DOI. A new 'full_name' column is added as 'family, given' using tidyr unite. The data can then be used for author name cleaning, analysis and visualization. To split other data columns for further processing use tidyr separate_rows. Warning At present this version only addresses crossref data where a DOI column is present and does not address other identifiers (ISBN, ISSN). A DOI column must be present for the function to work.

Value

a data.frame

References

https://github.com/ropensci/rcrossref

Examples

1
## Not run: pizza_authors <- crossref_authors(pizza_crossref_df$author, pizza_crossref_df, .id = pizza_crossref_df$DOI)

poldham/oldhammisc documentation built on May 25, 2019, 11:23 a.m.