-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
93 lines (72 loc) · 2.85 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
---
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%"
)
```
# certificate
<!-- badges: start -->
[![R-CMD-check](https://github.com/forwards/certificate/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/forwards/certificate/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/forwards/certificate/branch/main/graph/badge.svg)](https://app.codecov.io/gh/forwards/certificate?branch=main)
<!-- badges: end -->
The **certificate** package is designed to help generate certificates for R
courses.
## Installation
This package is not on CRAN. You can install the package from [GitHub](https://github.com/) with:
```r
# install.packages("devtools")
devtools::install_github("forwards/certificate")
```
## Example
First load the package
```{r load}
library(certificate)
```
Certificates can be generate for multiple participants at once. Here we specify
a couple of fake names for illustration (generated with `charlatan::ch_name`):
```{r attendees}
attendees <- c("Marnie Dickinson", "Dr. Marlin Wilderman")
```
Then we specify the basic metadata of the workshop, which will be the same for
all certificates
```{r workshop_metadata}
workshop <- "Package development workshop"
date <- as.Date("2018-01-01")
location <- "University of Lorraine"
```
The curriculum is a summary of the workshop contents. This should be specified
in markdown format and it is easier to write this in a separate markdown file.
An example is included in the **certificate** package.
```{r curriculum_chunk}
curriculum <- system.file("rmarkdown", "templates",
"workshop_certificate", "resources",
"default_workshop_contents.md",
package = "certificate")
readLines(curriculum)
```
The last set of required information is about the certifying person and the
certifying organization
```{r certifier}
certifier <- "Zaire Crooks"
credentials <- "Forwards teaching team member"
organization <- "Forwards, the R Foundation taskforce for women and other
under-represented groups"
organization_url <- "forwards.github.io/"
```
Now we can generate the certificates in a new directory, e.g.
```{r certificates}
dir <- "~/Desktop/certificates"
create_workshop_certificates(attendees, workshop, date, location,
curriculum, certifier, credentials,
organization, organization_url,
dir)
```
See `?create_workshop_certificate` for more detail on the arguments of this
function, which allow customization of the wording, logo and colours, as well
as the option to supply an image of a signature to place on the signature line.