+ - 0:00:00
Notes for current slide
Notes for next slide

the canyon of success

scaling best practices in R with internal R packages

Malcolm Barrett

1

2

3

consistent, robust code

scaleable best practices

4

consistent, robust code

5

6
In R, the fundamental unit of
shareable code
is the package.

— Hadley Wickham

7

library(lvgo)
create_lvgo_package("../lvgo.collaborate")

8

library(lvgo)
create_lvgo_package("../lvgo.collaborate")

Creating 'lvgo.collaborate'
Creating 'R/'
Writing 'DESCRIPTION'
Writing 'NAMESPACE'
Writing 'lvgo.collaborate.Rproj'
Adding 'testthat' to Imports field in DESCRIPTION
Creating 'tests/testthat/'
Initialising Git repo
Request a GitHub repo: `create_jira_github()`
When the repo is available: `use_lvgo_github()`
Setting active project to 'lvgo.collaborate'

9

library(lvgo)
create_lvgo_package("../lvgo.collaborate")

✓ Creating 'lvgo.collaborate'
✓ Creating 'R/'
✓ Writing 'DESCRIPTION'
✓ Writing 'NAMESPACE'
✓ Writing 'lvgo.collaborate.Rproj'
✓ Adding 'testthat' to Imports field in DESCRIPTION
✓ Creating 'tests/testthat/'
✓ Initialising Git repo
● Request a GitHub repo: `create_jira_github()`
● When the repo is available: `use_lvgo_github()`
✓ Setting active project to 'lvgo.collaborate'

10

scaleable best practices

11

project independence

version control

complete reproducibility

12

every analysis is an RStudio project

every project is a git repository

every repository has an renv environment

13

create_lvgo_project("../lvgo.collaborate")

Creating 'lvgo.collaborate'
Creating 'R/'
Writing 'lvgo.collaborate.Rproj'
Adding '.Rproj.user' to '.gitignore'
Initialising renv environment
Initialising Git repo
Request a GitHub repo: `create_jira_github()`
When the repo is available: `use_lvgo_github()`
Setting active project to 'lvgo.collaborate'

14

We also support automated code style, git and GitHub workflows, and code pipelines

15

2
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow