Skip to content

Commit

Permalink
install r package png in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
dancingfrog committed Dec 31, 2024
1 parent 60acbe0 commit d99636e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
with:
cache-version: 2
packages: |
any::jsonlite
any::png
any::quarto
any::renv
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
with:
cache-version: 2
packages: |
any::jsonlite
any::png
any::quarto
any::renv
Expand Down
5 changes: 5 additions & 0 deletions content/posts/visualize-r.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if (!require("png")) {
install.packages("png")
}
library(png)
if (!require("jsonlite")) {
install.packages("jsonlite")
}
library(jsonlite)
```

If the output target of your Rmd (R Markdown) content is HTML, R has some methods for turning R data into JavaScript or JSON data and printing the results within HTML tags.
Expand Down

0 comments on commit d99636e

Please sign in to comment.