-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.Rmd
More file actions
156 lines (121 loc) · 4.14 KB
/
index.Rmd
File metadata and controls
156 lines (121 loc) · 4.14 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
title: "Statistics, econometrics, experiment and survey methods, data science: Notes"
author: "Dr. David Reinstein; contributions from Gerhard Riener, Scott Dickinson, Oska Fentem, and others "
abstract: "This 'book' organizes my/our notes and helps others engage, understand, learn, and respond"
#cover-image: "images/cardcatalogue.JPG"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output:
bookdown::gitbook:
lib_dir: "book_assets"
includes:
in_header: support/header.html
css: support/tufte_plus.css
config:
toc:
after: |
<li><a href="https://bookdown.org" target="_blank">Published with bookdown</a></li>
collapse: section
scroll_highlight: yes
fontsettings:
theme: white
size: 2
sharing:
facebook: yes
twitter: yes
google: no
linkedin: yes
weibo: yes
instapaper: no
vk: no
all: ['facebook', 'twitter', 'linkedin', 'weibo', 'instapaper']
highlight: tango
download: [pdf, epub, mobi]
bookdown::pdf_book:
keep_tex: yes
sharing:
github: yes
facebook: no
always_allow_html: yes
bibliography: "references.bib, packages.bib"
biblio-style: apalike
link-citations: yes
github-repo: daaronr/metrics_discussion_work
description: ""
#url: 'https\://daaronr.github.io//'
tags: [Econometrics, Statistics, Data Science, Experiments, Survey methods, Notes, Methodology]
---
Try downloading and accessing some functions here:
```{r}
try_download <- function(url, path) {
new_path <- gsub("[.]", "X.", path)
tryCatch({
download.file(url = url,
destfile = new_path)
}, error = function(e) {
print("You are not online, so we can't download")
})
tryCatch(
file.rename(new_path, path
)
)
}
library(here)
here <- here::here()
try_download("https://raw.githubusercontent.com/daaronr/dr-rstuff/master/functions/project_setup.R", here::here("code","project_setup.R"))
source(here::here("code", "project_setup.R"))
```
#Basic options used across files and shortcut functions, e.g., 'pp()' for print
#functions grabbed from web and created by us for analysis/output
```{r eval=FALSE}
install.packages("bookdown")
install.packages("tufte")
# or the development version
# devtools::install_github("rstudio/bookdown")
```
**Pulling in key files from other repos; don't edit them here**
```{r pull-in-docs}
try_download("https://raw.githubusercontent.com/daaronr/data_acad_materials/main/other_content_notes/ds_for_bsns_notes.Rmd?token=AB6ZCMECAFDEIYJ72VEGU4K74YGOE", here::here("data_sci","ds_for_bsns_notes_remote.Rmd"))
```
```{r include=FALSE}
# automatically create a bib database for R packages
knitr::write_bib(c(
.packages(), 'bookdown', 'knitr', 'rmarkdown'
), 'packages.bib')
```
```{r html, echo=FALSE}
# globally set chunk options
knitr::opts_chunk$set(fig.align='center', out.width='80%', warning=FALSE, message = FALSE, error=TRUE)
my_output <- knitr::opts_knit$get("rmarkdown.pandoc.to")
```{r html, echo=FALSE}
# globally set chunk options
knitr::opts_chunk$set(fig.align='center', out.width='80%')
my_output <- knitr::opts_knit$get("rmarkdown.pandoc.to")
knitr::knit_hooks$set(
evaluate.inline = function (code, envir = knit_global()) {
v = try(eval(xfun::parse_only(code), envir = envir))
knitr::knit_print(v, inline = TRUE, options = knitr::opts_chunk$get())
},
inline = function(x) {
if (any(class(x) == "try-error")) {
as.vector(x)
} else x
})
```
<!-- BUILDING IT? SERVING IT?
bookdown::serve_book(dir = ".", output_dir = "_book", preview = TRUE,
in_session = TRUE, quiet = FALSE)
-->
<!---
Can define text blocks here, refer to them again and again if desired
-->
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- <html> -->
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=G-QLKFNFTGXX"></script> -->
<!-- <script> -->
<!-- window.dataLayer = window.dataLayer || []; -->
<!-- function gtag(){dataLayer.push(arguments);} -->
<!-- gtag('js', new Date()); -->
<!-- gtag('config', 'G-QLKFNFTGXX'); -->
<!-- </script> -->
<!-- </html> -->