Skip to content

Instantly share code, notes, and snippets.

@alexsingleton
Created August 17, 2016 20:46
Show Gist options
  • Save alexsingleton/9842ad69f15ee2a22d8f5a46bb62bf15 to your computer and use it in GitHub Desktop.
Save alexsingleton/9842ad69f15ee2a22d8f5a46bb62bf15 to your computer and use it in GitHub Desktop.
file_invited <- as.data.frame(ReadBib("invited.bib"))
file_invited$title <- gsub("\\{|\\}","",file_invited$title)# Remove {}
file_invited$address <- gsub("\\{|\\}","",file_invited$address)# Remove {}
dates <- unlist(unique(file_invited$year))[order(unlist(unique(file_invited$year)),decreasing = TRUE)]
#Prints references - slightly different format as converted to data frame for formating
for (date in dates) {
cat(paste0("##",date),"\n")
tmp <- file_invited[file_invited$year==date,]
for (i in 1:nrow(tmp)) {
cat(paste0("_",tmp[i,]$title,"._ "),paste0(tmp[i,]$address,".","\n"))
cat("\n")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment