目录

Bibtex Usage

Prerequisites

  1. R
  2. R package 'bibtex'
  3. Any reference management software/website that could generate a bibtex file describing your references

Procedures

  1. Get the bibtex file from your reference management software/website.
  2. Enter R and load the 'bibtex' package.
  3. Assuming that the file name is “ReferenceList.bib” and is located under the current working directory, enter the following codes to read and parse bibtex file:
    bibentry.list <- read.bib(file="ReferenceList.bib")
  4. Now you could do various statistics on your reference list!

Statistics

StatisticsResult formatComment
All author namesCharacter vector, each element of which is the full name for an author, with the given names coming first and the family name secondIf you'd like to change how the name is presented, feed additional parameters to the function 'format'
authorperref.list <- bibentry.list$author
unlist(lapply(authorperref.list, format))
StatisticsResult formatComment
Authors that contribute to at least 3 of these referencesA sorted table result describing authors matching the criteriaIf an author occurs n (n>1) times in a reference(this could happen if the “authors” of this reference are defined as all authors belonging to several communities/organizations which might have overlaps with respect to their staff), he/she will still be considered contributing to 1 reference; if you want to change this to “n references”, skip 'lapply'-ing the 'unique' function on 'authornameperref.list'.
snippet.r
authorperref.list <- bibentry.list$author
authornameperref.list <- lapply(authorperref.list, format)
##Some authors will occur in the paper more than once
authornameuniqueperref.list <- lapply(authornameperref.list, unique)
##
authors.vector <- unlist(authornameuniqueperref.list)
authors.table <- table(authors.vector)
sort(authors.table[which(authors.table >= 3)], decreasing=FALSE)