Skip to content

Commit

Permalink
few small fixes before tomorrow's workshop (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinteractive authored Oct 27, 2024
1 parent 13c6cc7 commit dd9a7d1
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 50 deletions.
6 changes: 1 addition & 5 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ website:
page-footer:
center:
- text: "About"
href: https://rconis.com/about/
- text: "Imprint"
href: https://rconis.com/imprint/
- text: "Contact"
href: https://rconis.com/contact/
href: https://rinpharma.com/

format:
html:
Expand Down
12 changes: 6 additions & 6 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ Learn, understand, and practice good software engineering rules. Participants wi
| Time | Topic |
|---------------------|:---------------------------------------------|
| 12:00 - 12:15 GMT+8 | Introduction and outline |
| 12:15 - 12:55 GMT+8 | R packages, what are they? + practical |
| 12:55 - 13:25 GMT+8 | Workflow for creating R packages + practical |
| 12:15 - 12:55 GMT+8 | R packages, what are they? |
| 12:55 - 13:25 GMT+8 | Workflow for creating R packages |
| 13:25 - 13:40 GMT+8 | Break |
| 13:40 - 14:20 GMT+8 | Package quality + exercise |
| 14:20 - 14:50 GMT+8 | Publication + practical |
| 15:50 - 15:00 GMT+8 | Conclusion |
| 13:40 - 14:20 GMT+8 | Package quality |
| 14:20 - 14:50 GMT+8 | Publication |
| 14:50 - 15:00 GMT+8 | Conclusion |

## Prerequisites & Technical Setup

Prior to the course, participants should:

- Install the latest [R](https://www.r-project.org/) and [RStudio](https://posit.co/download/rstudio-desktop/) software.
- Install [Rtools](https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html) (only on Windows).
- Install [Rtools](https://cran.r-project.org/bin/windows/Rtools/rtools44/rtools.html) (only on Windows).
- Install additional R packages using the [installation script](slides/download/install.R).
- Download and extract [simulatr.zip](slides/download/simulatr.zip)

Expand Down
40 changes: 19 additions & 21 deletions slides/01_intro.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ author: Daniel Sabanés Bové and Joe Zhu
- Biostatistician at Roche for 5 years, Data Scientist at Google for 2 years, Statistical Software Engineer at Roche for the last 4 years
- Co-founder of [RCONIS](https://rconis.com)
- Multiple R packages on CRAN and Bioconductor, co-wrote book on Likelihood and Bayesian Inference, chair of `openstatsware`
- Feel free to connect
[`r fontawesome::fa("linkedin")`](https://www.linkedin.com/in/danielsabanesbove/)
[`r fontawesome::fa("github")`](https://github.com/danielinteractive)
[`r fontawesome::fa("globe")`](https://rconis.com)
- Feel free to connect at
[`r fontawesome::fa("linkedin")` LinkedIn](https://www.linkedin.com/in/danielsabanesbove/),
[`r fontawesome::fa("github")` GitHub](https://github.com/danielinteractive) or
[`r fontawesome::fa("globe")` RCONIS](https://rconis.com)
:::
:::

Expand All @@ -48,7 +48,7 @@ author: Daniel Sabanés Bové and Joe Zhu
::: columns
::: {.column width="70%"}
- [openstatsware.org](https://openstatsware.org)
- Since: 19 August 2022 - almost 2 years now!
- Since: 19 August 2022 - more than 2 years already!
- Where: American Statistical Association (ASA) Biopharmaceutical Section (BIOP), European Federation of Statisticians in the Pharmaceutical Industry (EFSPI)
- Who: Currently more than 50 statisticians from more than 30 organizations
- What: Engineer packages and spread best practices
Expand All @@ -62,32 +62,30 @@ author: Daniel Sabanés Bové and Joe Zhu
## What you will learn here

- Understand the basic structure of an R package
- Create your own R `r fontawesome::fa("cube")`
- Learn about & apply professional `r fontawesome::fa("cube")` development workflow
- Learn & apply fundamentals of quality control for R `r fontawesome::fa("cube")`
- How to Create your own R `r fontawesome::fa("cube")`
- Learn about the professional `r fontawesome::fa("cube")` development workflow
- Learn and apply fundamentals of quality control for R `r fontawesome::fa("cube")`
- Learn how to make an R `r fontawesome::fa("cube")` available to others

## Program outline

| Time | Topic |
|--------------------|:---------------------------------------------|
| Time | Topic |
|---------------------|:---------------------------------------------|
| 12:00 - 12:15 GMT+8 | Introduction and outline |
| 12:15 - 12:55 GMT+8 | R packages, what are they? + practical |
| 12:55 - 13:25 GMT+8 | Workflow for creating R packages + practical |
| 12:15 - 12:55 GMT+8 | R packages, what are they? |
| 12:55 - 13:25 GMT+8 | Workflow for creating R packages |
| 13:25 - 13:40 GMT+8 | Break |
| 13:40 - 14:20 GMT+8 | Package quality + exercise |
| 14:20 - 14:50 GMT+8 | Publication + practical |
| 15:50 - 15:00 GMT+8 | Conclusion |

| 13:40 - 14:20 GMT+8 | Package quality |
| 14:20 - 14:50 GMT+8 | Publication |
| 14:50 - 15:00 GMT+8 | Conclusion |

## House-keeping

- Course website at [https://openpharma.github.io/workshop-r-swe-rinpharma-2024](https://openpharma.github.io/workshop-r-swe-rinpharma-2024)
- all slides
- sources available at [https://github.com/openpharma/workshop-r-swe-rinpharma-2024](https://github.com/openpharma/workshop-r-swe-rinpharma-2024)
- short link: [https://tinyurl.com/3st8rvkn](https://tinyurl.com/3st8rvkn)
- all materials CC-BY-SA 4.0
- We offer a [gitter chat channel](https://matrix.to/#/#workshop-r-swe_community:gitter.im)
- use to ask your peers questions

## What you will need

Expand All @@ -100,9 +98,9 @@ author: Daniel Sabanés Bové and Joe Zhu

## Speed intros and what would you like to learn?

- Name? `r emoji::emoji("face")`
- Organization? `r emoji::emoji("office")`
- Motivation for this workshop/ what would you like to learn `r emoji::emoji("brain")`
- Please enter the following in the chat - in one sentence:
- Your name `r emoji::emoji("face")`
- Motivation for this workshop/ what would you like to learn `r emoji::emoji("brain")`

## What do we mean by GSWEP4R\*?

Expand Down
8 changes: 8 additions & 0 deletions slides/02_r_packages.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ author: Daniel Sabanés Bové
- How to do this in a methodical and sustainable way
- Give tips and tricks based on practical experience

## How Familiar Are You with R Packages?

Please enter in the chat:

- 0 if you have never written an R package
- 1 if you have written an R package but never submitted to CRAN
- 2 if you have written an R package and submitted to CRAN

# Contents of a Package

## How is a Package Structured?
Expand Down
6 changes: 6 additions & 0 deletions slides/04_quality.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ CCR#8: TDD

![](thumbnails/testing.jpg){fig-align="center"}

## Share Your Experience

Have you ever written unit tests for your code?

- Enter `yes` or `no` in the chat

## Verification vs Validation

::: columns
Expand Down
21 changes: 5 additions & 16 deletions slides/05_publication.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,11 @@ Example message informing about the rejection of the last
::: {.column width="70%"}
- Free `R CMD check` runs on [different operating systems](https://docs.r-hub.io/#which-platform) before submitting to CRAN
- Supported by the R consortium
- Typically used via the [website](https://builder.r-hub.io/)
- There is also an R API: `rhub::check()` is comfortable
- Note: New API with R-hub v2 since a few weeks ([details](https://r-hub.github.io/rhub/articles/rhubv2.html))
- Now works with GitHub Actions:
1. Put your package in a GitHub repository
1. Use `rhub::rhub_setup()` for setting up the GitHub action
1. Push this change to GitHub
1. Use `rhub::rhub_check()` to check your package
:::
:::

Expand Down Expand Up @@ -245,19 +247,6 @@ Example message informing about the rejection of the last
- [R-hub builder](https://builder.r-hub.io/)
- [Bioconductor packages](https://contributions.bioconductor.org/index.html)

# Exercise

Use the same repository created from template [https://github.com/kkmann/simulatr](https://github.com/kkmann/simulatr)

- Run CRAN like checks in RStudio: use `--as-cran` in check options
- Look at the CI/CD checks reported on your GitHub repository
- Where are the `R CMD check` results?
- Enable github page through `use_pkgdown_github_pages`
- Deploy the website with `pkgdown`
- Need to change remote to `git`
- Deploy the website through `use_github_action("pkgdown")`
- (Optional) Check the automatic github page deploy action

# License Information

- Creators (initial authors):
Expand Down
8 changes: 7 additions & 1 deletion slides/06_conclusion.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ image: thumbnails/conclusion.jpg
author: Daniel Sabanés Bové
---

## Your Learnings

Please enter in the chat:

- What new skill did you learn in today's workshop?

# Take away messages

## R package structure
Expand Down Expand Up @@ -64,7 +70,7 @@ library(emoji)

::: {.column width="70%"}
- It was great to teach you today on how to build R packages
- Let's keep in touch e.g. via the [gitter chat channel](https://gitter.im/workshop-r-swe/community) for this course that you can connect to
- Let's keep in touch e.g. via LinkedIn or GitHub
- We welcome feedback on topics/format/content - reach out!
:::
:::
Expand Down
2 changes: 1 addition & 1 deletion slides/_license_footer.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- This work is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).
- The source files are hosted at [github.com/RCONIS/user2024-tutorial-gswep](https://github.com/RCONIS/user2024-tutorial-gswep), which is forked from and a subset of the original version at [github.com/RCONIS/workshop-r-swe-zrh](https://github.com/RCONIS/workshop-r-swe-zrh).
- The source files are hosted at [github.com/openpharma/workshop-r-swe-rinpharma-2024](https://github.com/openpharma/workshop-r-swe-rinpharma-2024), which is forked from the original version at [github.com/RCONIS/user2024-tutorial-gswep](https://github.com/RCONIS/user2024-tutorial-gswep).
- Important: To use this work you must provide the name of the creators (initial authors), a link to the material, a link to the license, and indicate if changes were made
Binary file modified slides/resources/daniel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd9a7d1

Please sign in to comment.