Skip to content

Commit

Permalink
Basic code sections added (just loads libraries)
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-rse committed Sep 14, 2023
1 parent 39c352b commit 3ff6370
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ jobs:
quarto install --no-prompt extension grantmcdermott/quarto-revealjs-clean
quarto install --no-prompt extension ArthurData/quarto-confetti
# - name: Install Python and Dependencies
# uses: actions/[email protected]
# with:
# python-version: '3.10'
# cache: 'pip'
# - run: pip install -r requirements.txt

# - name: Install R
# uses: r-lib/actions/setup-r@v2
# with:
# r-version: '4.2.0'

# - name: Install R Dependencies
# uses: r-lib/actions/setup-renv@v2
# with:
# cache-version: 1
- name: Install Python and Dependencies
uses: actions/[email protected]
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'

- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1

- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
Expand Down
20 changes: 16 additions & 4 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ different types.
:::: {.columns}

::: {.column width="50%"}
**ToDo**
Unordered...

```markdown
+ Learn Markdown
Expand All @@ -71,7 +71,7 @@ different types.
:::

::: {.column width="50%"}
**ToDo**
Unordered...

+ Learn Markdown
+ Create Quarto Slides
Expand All @@ -92,7 +92,7 @@ different types.
:::: {.columns}

::: {.column width="50%"}
**Ordered**
Ordered...

```markdown
1. A comes before
Expand All @@ -103,7 +103,7 @@ different types.
:::

::: {.column width="50%"}
**Ordered**
Ordered...

1. A comes before
2. B which is followed by
Expand Down Expand Up @@ -166,12 +166,24 @@ You can write equations if you need to.

## R code

```{R}
library(ggplot2)
library(reticulate)
```

::: {.notes}
[R](https://www.r-project.org/) code can be embeded and executed to produce tables and figures.
:::

## Python code

Requires you to load the `reticulate` library in R first.

```{python}
import numpy as np
import pandas as pd
```

::: {.notes}
As can [Python](https://www.python.org) code.
:::
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy
pandas

0 comments on commit 3ff6370

Please sign in to comment.