-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
153 lines (123 loc) · 6.59 KB
/
README.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
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
---
title: "VSA 2020 Presentation"
subtitle: "VSA, Analogy, and Dynamic Similarity"
author: Ross Gayler
date: 2020-02-22
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
# knitr::opts_chunk$set(
# collapse = TRUE,
# comment = "#>",
# fig.path = "man/figures/README-",
# out.width = "100%"
# )
```
<!-- badges: start -->
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3700836.svg)](https://doi.org/10.5281/zenodo.3700836)
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
<!-- badges: end -->
Create the presentation, "VSA, Analogy, and Dynamic Similarity", to be given
at the [Workshop on Developments in Hyperdimensional Computing and Vector Symbolic Architectures](https://sites.google.com/view/vsaworkshop2020/home)
on 2020-03-16
in Heidelberg, Germany.
This event is associated with the [8th Annual Neuro-Inspired Computational Elements (NICE) Workshop](https://niceworkshop.org/nice-2020/).
*The workshop was cancelled because of the COVID-19 pandemic,
but I have made the presentation available anyway.*
The primary purpose of this repository is to archive the source code for creating the presentation.
The secondary purpose is to document the process of creating and running the project,
in the hope that it will save me some time for the next presentation project.
## Project setup
This assumes starting with everything that's on my computer right now.
Your mileage *will* vary
(in particular, you may have to install a bunch of R packages).
1. Make sure `usethis` is installed
and follow the [setup instructions](https://usethis.r-lib.org/articles/articles/usethis-setup.html)
so that user name and other details are set up ready for the project.
1. Create empty GitHub repo `VSA_2020_presentation`
using these [instructions](https://happygitwithr.com/new-github-first.html#make-a-repo-on-github-2).
1. Create a local RStudio project by cloning the GitHub repo
using these [instructions](https://happygitwithr.com/new-github-first.html#new-rstudio-project-via-git-clone).
1. Add file `.gitattributes` with the following contents
so that Rmarkdown files are recognised as `R` by GitHub.
```
# Get GitHub to reclassify `.Rmd` files as R
```
```
*.Rmd linguist-language=R
```
1. Create a `figs` subdirectory of the new project to contain figures
(which will be copied from past projects).
1. Guard against leaking credentials to GitHub.
This only needs to be done once per user/computer
but does no harm to be repeated for each new project.
```
usethis::git_vaccinate()
```
1. Activate `renv` package tracking.
```
renv::init()
```
This starts the project with an empty library,
so all the infrastructure will have to be installed as it is first used.
You will use `renv::install()` a lot,
in particular, you will have to install `usethis` into the project.
1. Install `usethis` to the project and mark the project as using `usethis`
(updates the project-specific `.Rprofile`).
```
renv::install("usethis")
```
```
usethis::use_usethis()
```
1. This presentation document requires the `binb` package to enable rendering the output as a PDF presentation.
The document uses the `binb` metropolis template.
This requires a variety of LaTeX tools and fonts to be installed,
in addition to the rmarkdown and knitr infrastructure.
See [eddelbuettel/binb](https://github.com/eddelbuettel/binb) for `binb` installation advice.
* Make sure the Fira Sans and Fira Mono fonts are installed.
(Instructions on how to [check what fonts are installed](https://www.cyberciti.biz/tips/quickly-list-all-available-fonts.html).
I found it convenient to download [Fira Sans](https://www.fontsquirrel.com/fonts/fira-sans)
and [Fira Mono](https://www.fontsquirrel.com/fonts/fira-mono) from [Font Squirrel](https://www.fontsquirrel.com).
Instructions on [how to install fonts](https://itsfoss.com/install-fonts-ubuntu/) -
for reasons I don't understand, using `font-manager` didn't work,
whereas copying the font files to `$/.fonts` did work.)
* The first attempt to knit the presentation
may result in the LaTeX package manager running for **ages**
while installing the required LaTeX infrastructure.
* For a future project it may be worth trying to set up a [Docker](https://www.docker.com/) image
with the fonts and LaTeX packages installed.
1. Copy `README.Rmd` (this document) from a prior GitHub linked project
and edit it to explain what this project is about and how it was set up.
Keep this up to date as the project progresses.
See [GitHub document](https://rmarkdown.rstudio.com/github_document_format.html)
for instructions on the contents for this kind of README to be rendered on GitHub.
1. Set the license.
```
usethis::use_ccby_license()
```
Add the appropriate license badge from [lukas-h/license-badges.md](https://gist.github.com/lukas-h/2a5d00690736b4c3a7ba) to README.Rmd.
1. Commit, push, rinse, and repeat as the project progresses.
Follow [these instructions](https://happygitwithr.com/new-github-first.html#make-local-changes-save-commit-1).
## Write presentation
1. Copy in resources from previous projects to use as a starting point.
* VSA2020_Gayler_abstract.pdf # submitted extended abstract of presentation
* VSA2020_Gayler_abstract.zip # source code of extended abstract
* Figures from old presentations
1. Write presentation, copying figures from prior documents as needed
* How to make citations in Rmarkdown: https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#bibliographies
* The citation style file `apa-single-spaced.csl` came from the
[Zotero Style Repository](https://www.zotero.org/styles?q=id%3Aapa-single-spaced&fields=psychology&format=author-date).
1. Render presentation by clicking the `Knit` button in the notebook editor window.
1. Insert, into the presentation, links to the published/archived versions of the documents.
* The URL of the github is already known.
* The presentation will be published on [Zenodo](https://zenodo.org).
A DOI can be reserved as part of uploading a work in progress.
See [here](https://instruct-eric.eu/help/other/zenodo-upload-guidelines)
for example instructions.
## Clean up and publish
1. Remove any documents not used in current presentation.
1. Push the final version to github.
1. Publish to Zenodo by clicking the "Publish" button on the upload page.
Previous work in progress versions were "Save"d rather than "Publish"ed.