forked from mca91/EconometricsWithR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreferences.Rmd
74 lines (63 loc) · 2.15 KB
/
references.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
`r if (knitr:::is_html_output()) '# References {-}'`
```{r include=FALSE}
# generate a BibTeX database automatically for some R packages
knitr::write_bib(
c(
.packages(), 'bookdown', 'knitr', 'rmarkdown'
),
'packages.bib',
prefix = "R-",
tweak = T,
width = 500)
# some adjustments
library(dplyr)
l <- gsub(pattern = "note = ", replacement = "version = ", x = readLines("packages.bib")) %>% gsub(pattern = "R package version ", replacement = "")
l[grep("title = ", l)] <- gsub("\\{", "\\{\\{", l[grep("title = ", l)]) %>% gsub(pattern = "\\}", replacement = "\\}\\}")
# add some packages manually because not captured correctly by write_bib for some reason
l <- append(l,
c(
"@Manual{R-dynlm,
title = {{dynlm}: Dynamic Linear Regression},
author = {Achim Zeileis},
year = {2019},
note = {R package version 0.3-6},
url = {https://CRAN.R-project.org/package=dynlm},
}",
"@Book{R-AER,
title = {Applied Econometrics with {R}},
author = {Christian Kleiber and Achim Zeileis},
year = {2008},
publisher = {Springer-Verlag},
address = {New York},
note = {{ISBN} 978-0-387-77316-2},
url = {https://CRAN.R-project.org/package=AER},
}",
"@Manual{R-orcutt,
title = {{orcutt}: Estimate Procedure in Case of First Order Autocorrelation},
author = {Spada Stefano and Matteo Quartagno and Marco Tamburini and David Robinson},
year = {2018},
url = {https://CRAN.R-project.org/package=orcutt},
}",
"@Manual{R-stargazer,
title = {stargazer: Well-Formatted Regression and Summary Statistics Tables},
author = {Marek Hlavac},
year = {2022},
note = {R package version 5.2.3},
organization = {Social Policy Institute},
address = {Bratislava, Slovakia},
url = {https://CRAN.R-project.org/package=stargazer},
}",
"@Book{R-urca,
title = {Analysis of Integrated and Cointegrated Time Series with R},
author = {B. Pfaff},
publisher = {Springer},
edition = {Second},
address = {New York},
year = {2008},
note = {ISBN 0-387-27960-1},
url = {https://www.pfaffikus.de},
}"
)
)
writeLines(l, con = "packages.bib")
```