https://github.com/trinker/annotated_bibliography
https://github.com/trinker/annotated_bibliography
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/trinker/annotated_bibliography
- Owner: trinker
- Created: 2014-06-10T16:30:17.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-11T03:24:56.000Z (about 12 years ago)
- Last Synced: 2025-10-07T17:51:44.519Z (9 months ago)
- Language: TeX
- Size: 297 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Annotated Bibliography
========================================================
This is an repo demonstrating the use of a data base to build reports. Here I store information around various articles in [ann_bib.xlsx](ann_bib.xlsx). This approach uses R + knitr to create reports from a data base. The process is fully automated in the .Rnw file ([Annotated_Bibliography.Rnw](Annotated_Bibliography.Rnw)) as it reads in the information from [ann_bib.xlsx](ann_bib.xlsx) and the bibligraphy, [refs.bib](refs.bib). Other possible uses of a data base to report aproach include:
- CV/Resume generation
- ...
The [converting.R](converting.R) demonstrates how to use Pandoc to convert between file types.
## Output Files
- [Annotated_Bibliography.pdf](Annotated_Bibliography.pdf)
- [Annotated_Bibliography.md](Annotated_Bibliography.md)
- [Annotated_Bibliography_TOC.md](Annotated_Bibliography_TOC.md)
- [Annotated_Bibliography.html](Annotated_Bibliography.html)
## Code to Generate Report
```r
library(xlsx)
dat <- read.xlsx(file="ann_bib.xlsx", sheetIndex=1, colIndex=1:5)
dat <- dat[rowSums(t(apply(dat, 1, is.na))) == 0, ]
dat[, 1:4] <- lapply(1:4, function(i, type=c(rep("as.character", 4))) {
FUN <- match.fun(type[i])
x <- FUN(dat[, i])
x
})
w <- "\\section{\\textcite{%s}}\n\n
\\negpar{\\textcolor{darkblue}{\\fullcite{%s}}}\n\n\n
\\regpar\n\n\n
\\subsection{Summary of Research Questions \\& Results/Conclusion} %% A short summary of the research question and results/conclusions (75-100 words)\n%s\n
\\subsection{Evaluation of Methods \\& Conclusions} %% An evaluation of methods and conclusions (25-75) words.\n%s\n
\\subsection{Significance to Topic} %% The contribution to your topic (why is this paper important?)\n%s\n
%%==========================================================================\n\n"
cat(sprintf(w, dat[, 1], dat[, 1], dat[, 2], dat[, 3], dat[, 4]))
```