Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed Sep 22, 2024
2 parents 69ac7c5 + 93b8ecf commit bdf4d1a
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 35 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/assign-pr-to-creator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Assign PR to creator

on:
pull_request:
types:
- reopened
- opened

permissions:
pull-requests: write

jobs:
assign-pr-to-creator:
name: Assign PR to creator
runs-on: ubuntu-latest
steps:
- name: Assign PR to creator
if: ${{ github.event_name == 'pull_request' }}
run: |
gh pr edit $PR --add-assignee $AUTHOR
env:
AUTHOR: ${{ github.event.pull_request.user.login }}
PR: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 8 additions & 8 deletions _extensions/rostools/r3-theme/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
title: r3-theme
author: Luke W. Johnston
version: 1.0.3
quarto-required: ">=1.2.0"
version: 1.0.5
quarto-required: ">=1.3.0"
contributes:
format:
html:
highlight-style: a11y
code-line-numbers: true
df-print: tibble
code-overflow: scroll
from: markdown+emoji
code-link: true
theme:
- litera
- zephyr
- custom-site.scss

revealjs:
Expand All @@ -33,22 +35,20 @@ contributes:
favicon: "favicon.ico"
repo-branch: main
repo-actions: [edit, issue, source]
search:
location: navbar
type: overlay
search: true

execute:
freeze: auto
warning: false

csl: vancouver.csl

callout-appearance: minimal
reference-location: margin
crossref:
chapters: true

knitr:
opts_chunk:
class-output: sourceCode
comment: "#>"
fig-dpi: 72
fig-width: 5.5
Expand Down
7 changes: 5 additions & 2 deletions _extensions/rostools/r3-theme/custom-site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ $font-family-serif: "Nanum Gothic", sans-serif !default;
$font-family-sans-serif: "Nanum Gothic", sans-serif !default;
$headings-font-family: "Cabin", sans-serif !default;
$font-size-root: 18px !default;
$code-block-border-left: "grey60" !default;

/*-- scss:rules --*/

svg {
display: block;
max-width: 100%;
max-width: 100% !important;
margin: 0 auto;
height: auto !important;
width: auto !important;
Expand All @@ -26,3 +25,7 @@ svg {
width: 100%;
height: 425px;
}

kbd {
padding: .15rem .15rem;
}
35 changes: 17 additions & 18 deletions _variables.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Automatically created by `r3admin::copy_common_file('_variables.yml')` on 2023-11-04.
keybind:
palette: '{{< kbd linux=Ctrl-Shift-P mac=Cmd-Shift-P win=Ctrl-Shift-P >}}'
git: '{{< kbd linux=Ctrl-Alt-M mac=Cmd-Option-M win=Ctrl-Alt-M >}} or with the Palette ({{< var keybind.palette >}}, then type "commit")'
chunk: '{{< kbd linux=Ctrl-Alt-I mac=Cmd-Option-I win=Ctrl-Alt-I >}} or with the Palette ({{< var keybind.palette >}}, then type "new chunk")'
restart-r: '{{< kbd linux=Ctrl-Shift-F10 mac=Cmd-Shift-F10 win=Ctrl-Shift-F10 >}} or with the Palette ({{< var keybind.palette >}}, then type "restart")'
source: '{{< kbd linux=Ctrl-Shift-S mac=Cmd-Shift-S win=Ctrl-Shift-S >}} or with the Palette ({{< var keybind.palette >}}, then type "source")'
render: '{{< kbd linux=Ctrl-Shift-K mac=Cmd-Shift-K win=Ctrl-Shift-K >}} or with the Palette ({{< var keybind.palette >}}, then type "render")'
roxygen: '{{< kbd linux=Ctrl-Shift-Alt-R mac=Cmd-Shift-Alt-R win=Ctrl-Shift-Alt-R >}} or with the Palette ({{< var keybind.palette >}}, then type "roxygen comment")'
outline: '{{< kbd linux=Ctrl-Shift-O mac=Cmd-Shift-O win=Ctrl-Shift-O >}} or with the Palette ({{< var keybind.palette >}}, then type "outline")'
palette: '{{< kbd Ctrl-Shift-P >}}'
git: '{{< kbd Ctrl-Alt-M >}} or with the Palette ({{< var keybind.palette >}}, then type "commit")'
chunk: '{{< kbd Ctrl-Alt-I >}} or with the Palette ({{< var keybind.palette >}}, then type "new chunk")'
restart-r: '{{< kbd Ctrl-Shift-F10 >}} or with the Palette ({{< var keybind.palette >}}, then type "restart")'
source: '{{< kbd Ctrl-Shift-S >}} or with the Palette ({{< var keybind.palette >}}, then type "source")'
render: '{{< kbd Ctrl-Shift-K >}} or with the Palette ({{< var keybind.palette >}}, then type "render")'
roxygen: '{{< kbd Ctrl-Shift-Alt-R >}} or with the Palette ({{< var keybind.palette >}}, then type "roxygen comment")'
outline: '{{< kbd Ctrl-Shift-O >}} or with the Palette ({{< var keybind.palette >}}, then type "outline")'
styler: 'the Palette ({{< var keybind.palette >}}, then type "style file")'
outline: '{{< kbd linux=Ctrl-Shift-O mac=Cmd-Shift-O win=Ctrl-Shift-O >}} or with the Palette ({{< var keybind.palette >}}, then type "outline")'
targets_make: 'the Palette ({{< var keybind.palette >}}, then type "targets run")'
targets_vis: 'the Palette ({{< var keybind.palette >}}, then type "targets visual")'
targets_outdated: 'the Palette ({{< var keybind.palette >}}, then type "targets outdated")'
build_site: '{{< kbd linux=Ctrl-Shift-B mac=Cmd-Shift-B win=Ctrl-Shift-B >}}'
find: '{{< kbd linux=Ctrl-Shift-F mac=Cmd-Shift-F win=Ctrl-Shift-F >}} or with the Palette ({{< var keybind.palette >}}, then type "find files")'
visual_edit: '{{< kbd linux=Ctrl-Shift-F4 mac=Cmd-Shift-F4 win=Ctrl-Shift-F4 >}}'


targets-make: 'the Palette ({{< var keybind.palette >}}, then type "targets run")'
targets-vis: 'the Palette ({{< var keybind.palette >}}, then type "targets visual")'
targets-outdated: 'the Palette ({{< var keybind.palette >}}, then type "targets outdated")'
build-site: '{{< kbd Ctrl-Shift-B >}}'
find: '{{< kbd Ctrl-Shift-F >}} or with the Palette ({{< var keybind.palette >}}, then type "find files")'
visual-edit: '{{< kbd Ctrl-Shift-F4 >}}'
pipe: '{{< kbd Ctrl-Shift-M >}}'
code-section: '{{< kbd Ctrl-Shift-R >}} or with the Palette ({{< var keybind.palette >}}, then type "code section")'
run-code: '{{< kbd Ctrl-Enter >}}'
17 changes: 10 additions & 7 deletions sessions/stats-analyses-multiple.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,14 @@ to add the original variable names. Then we can add our first

> Time: \~25 minutes.
Convert the code that calculates the model estimates as well as the code
that adds the original metabolite names into functions. Start with the
code for the metabolite names, using the scaffold below as a starting
point.
::: {.callout-warning appearance="default"}
There are two parts to this exercise and two solution chunks.
:::

**Part 1**: Convert the code that calculates the model estimates as well
as the code that adds the original metabolite names into functions.
Start with the code for the metabolite names, using the scaffold below
as a starting point.

1. Name the new function `add_original_metabolite_names`.
2. Within the `function()`, add two arguments, where the first is
Expand Down Expand Up @@ -370,8 +374,8 @@ add_original_metabolite_names <- function(model_results, data) {
}
```

Do the same thing with the code that creates the model results, using
the scaffold below as a starting point.
**Part 2**: Do the same thing with the code that creates the model
results, using the scaffold below as a starting point.

``` r
calculate_estimates <- function(data) {
Expand Down Expand Up @@ -714,4 +718,3 @@ targets::tar_make()
than fewer, bigger ones.
- Use dot-whisker plots like `geom_pointrange()` to visualize the
estimates and their standard error.

0 comments on commit bdf4d1a

Please sign in to comment.