This function accepts a data object (such as a tibble) and formats the output into a suitable format for the template used. The inputs can also involve further calculations, which will be done using the provided data.

brief_entries(data, what, when, with, .protect = TRUE)

detailed_entries(data, what, when, with, where, why, .protect = TRUE)

Arguments

data

A data.frame or tibble.

what

The primary value of the entry (such as workplace title or degree).

when

The time of the entry (such as the period spent in the role).

with

The company or organisation.

.protect

When TRUE, inputs to the previous arguments will be protected from being parsed as LaTeX code.

where

The location of the entry.

why

Any additional information, to be included as dot points. Multiple dot points can be provided via a list column. Alternatively, if the same what, when, with, and where combinations are found in multiple rows, the why entries of these rows will be combined into a list.

Details

All non-data inputs are optional, and will result in an empty space if omitted.

Examples

packages_used <- tibble::tribble(
  ~ package, ~ date, ~ language, ~ timezone, ~ details,
  "vitae", Sys.Date(), "R", Sys.timezone(), c("Making my CV with vitae.", "Multiple why entries."),
  "rmarkdown", Sys.Date()-10, "R", Sys.timezone(), "Writing reproducible, dynamic reports using R."
)
packages_used %>%
  detailed_entries(what = package, when = date, with = language, where = timezone, why = details)
#> # A tibble:   2 × 5
#> # Groups:     what, when, with, where [2]
#> # vitae type: detailed entries
#>   what      when       with  where why      
#> * <chr>     <date>     <chr> <chr> <list>   
#> 1 vitae     2022-04-06 R     UTC   <chr [2]>
#> 2 rmarkdown 2022-03-27 R     UTC   <chr [1]>