The process of maintaining a CV can be tedious. With the vitae package, creating and maintaining a Résumé or CV will be simple.
Nüance-R has made available the vitae
package (O’Hara-Wild and Hyndman 2019) for you to use it. The vitae package makes creating and maintaining a Résumé or CV with R Markdown simple. It provides a collection of LaTeX templates, with helpful functions to add content to the documents.
Go to File
> New File
> R Markdown
> From Template
.
A window will open, showing a list of R Markdown templates provided by all installed packages installed by Nüance-R. You have some templates from the vitae package to use.
Like other R Markdown documents, the file is split into two sections: the YAML and the main body. Let’s take a look at it!
The YAML contains general entries that are common across many templates, such as your name, address and social media profiles. This is also where the output format (the CV template used) is specified, along with any options that the template supports. An example of what this header may look like is shown below:
---
: Mitchell O Hara-Wild
name: "`r format(Sys.time(), '%B, %Y')`"
date: pic.jpg
profilepic: mitchelloharawild.com
www: mitchelloharawild
github: mitchelloharawild
linkedin: mitchoharawild
twitter: 414141
headcolor: CV/Resume
docname: vitae::awesomecv
output---
You can also see that the output is set to vitae::awesomecv, which indicates that this CV uses the Awesome CV template. There are 4 vitae templates available:
The YAML allows these fields to be specified:
name:
Your name
surname:
Your family or last name
position:
Your current workplace title or field
address:
Your address
date:
The current date
profilepic:
A local file path to an image
www:
Your website address
email:
Your email address
twitter:
Your twitter handle
github:
Your GitHub handle
linkedin:
Your LinkedIn username
aboutme:
A short description that is included in a template specific location
headcolor:
A featured colour for the template
docname:
Control the document name (typically curriculum vitae, or résumé)
Like other R Markdown documents, the body allows you to mix R code with markdown to create the main content for your document. Below is an example of the start for a typical CV:
Write a setup R chunck for your entire document. The setup chunk is useful to load in any packages that you may use, and also prevent R code and warnings/notes from appearing in your CV.
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(vitae)
```
Then continue your CV, with headers normally.
Unlike other R markdown formats, the vitae package and its templates support functions to generate CV entries from data: detailed_entries() and brief_entries(). Both functions provide sections for what, when, and with, and the detailed_entries() additionally supports where and why. They use an interface similar to dplyr, in that the data can be piped (%>%) into these functions, and the arguments can involve some calculations.
Let’s add to the main body with some education history. These details are available on ORCID with the ID example of 0000-0001-6729-7695, which can be dynamically accessed using the rorcid package.
# Education
library(vitae)
<- do.call("rbind",
edu ::orcid_educations("0000-0001-6729-7695")$`0000-0001-6729-7695`$`affiliation-group`$summaries
rorcid
)%>%
edu detailed_entries(
what = `education-summary.role-title`,
when = glue::glue("{`education-summary.start-date.year.value`} - {`education-summary.end-date.year.value`}"),
with = `education-summary.organization.name`,
In the example above, the glue package has been used to combine the start and end years for the “when” input. Excluding any arguments is also okay (as is done for why), it will just be left blank in the CV.
Brief entries can be included with the same interface as detailed_entries(), and is appropriate for entries that do not need as much detail (such as skills). Another application of this is to include a list of R packages that you have published to CRAN using the pkgsearch package.
# R Packages
::ps("O'Hara-Wild",size = 100) %>%
pkgsearchfilter(purrr::map_lgl(package_data, ~ grepl("Mitchell O'Hara-Wild", .x$Author, fixed = TRUE))) %>%
arrange(desc(downloads_last_month)) %>%
brief_entries(
what = title,
when = lubridate::year(date),
This example also uses several other packages to prepare the data: - dplyr to filter() my contributed packages, and arrange() the data by downloads - purrr to map over package_data column to find packages I’ve contributed to - lubridate to display only the year from the date column.
For attribution, please cite this work as
Warin (2020, March 25). Thierry Warin, PhD: [R Course] How to: Write a CV with R Markdown. Retrieved from https://warin.ca/posts/rcourse-howto-writeacvwithrmarkdown/
BibTeX citation
@misc{warin2020[r, author = {Warin, Thierry}, title = {Thierry Warin, PhD: [R Course] How to: Write a CV with R Markdown}, url = {https://warin.ca/posts/rcourse-howto-writeacvwithrmarkdown/}, year = {2020} }