Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only first author is kept with as.data.frame.Bibentry if BibEntry contains a single citation #51

Closed
damonbayer opened this issue May 21, 2018 · 0 comments

Comments

@damonbayer
Copy link

After fixing #10 RefManageR can convert a single citation BibEntry with multiple authors to a data.frame without producing an error, but the conversation does work correctly. Only the first author is kept in the data.frame.

library(RefManageR)
pmids <- GetPubMedByID(c("15689760", "3586818"))
pmid <- GetPubMedByID(c("15689760"))

print(pmids[1])
#> [1] N. A. Goldstein, E. M. Mandel, M. Kurs-Lasky, et al. "Water
#> precautions and tympanostomy tubes: a randomized, controlled
#> trial". Eng. In: _The Laryngoscope_ 115.2 (Feb. 2005), pp. 324-30.
#> ISSN: 0023-852X. DOI: 10.1097/01.mlg.0000154742.33067.fb. PMID:
#> 15689760.
print(pmid)
#> [1] N. A. Goldstein, E. M. Mandel, M. Kurs-Lasky, et al. "Water
#> precautions and tympanostomy tubes: a randomized, controlled
#> trial". Eng. In: _The Laryngoscope_ 115.2 (Feb. 2005), pp. 324-30.
#> ISSN: 0023-852X. DOI: 10.1097/01.mlg.0000154742.33067.fb. PMID:
#> 15689760.

# First entry in pmids is the same as the lone entry in pmid

# Convert to data frames
pmids.df <- as.data.frame(pmids)
pmid.df <- as.data.frame(pmid)

pmids.df$author[1]
#> [1] "Nira A Goldstein and Ellen M Mandel and Marcia Kurs-Lasky and Howard E Rockette and Margaretha L Casselbrant"
pmid.df$author
#> [1] "Nira A Goldstein"

# Only the first author is kept from the single BibEntry in the converted data.frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant