Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcanouil/rstartup
Tips to start working with R
https://github.com/mcanouil/rstartup
introduction presentation-slides r startup
Last synced: 19 days ago
JSON representation
Tips to start working with R
- Host: GitHub
- URL: https://github.com/mcanouil/rstartup
- Owner: mcanouil
- License: cc-by-sa-4.0
- Created: 2020-02-24T13:48:08.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-11T09:31:36.000Z (about 3 years ago)
- Last Synced: 2024-11-13T16:42:25.820Z (29 days ago)
- Topics: introduction, presentation-slides, r, startup
- Language: HTML
- Homepage: https://m.canouil.dev/rstartup/
- Size: 47.5 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - mcanouil/rstartup - Tips to start working with R. (HTML)
README
---
output: github_document
---# rstartup
[![License](https://img.shields.io/github/license/mcanouil/rstartup)](LICENSE)
This is the repository for the slides about how to have a good start with R (in French).
```{r, include = FALSE}
library(magick)
library(here)
library(chromote)
library(glue)thumb <- "thumbs/title_slide_thumb.png"
png <- sub("_thumb", "", thumb)
index_html <- here::here("docs/index.html")if (!file.exists(thumb) | file.mtime(thumb) < file.mtime(index_html)) {
web_browser <- suppressMessages(try(chromote::ChromoteSession$new(), silent = TRUE))
if (inherits(web_browser, "try-error") && Sys.info()[["sysname"]] == "Windows") {
edge_path <- "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
if (file.exists(edge_path)) {
Sys.setenv(CHROMOTE_CHROME = edge_path)
web_browser <- chromote::ChromoteSession$new()
} else {
stop('Please set Sys.setenv(CHROMOTE_CHROME = "Path/To/Chrome")')
}
}
web_browser$Page$navigate(index_html, wait_ = FALSE)
page_browser <- web_browser$Page$loadEventFired()
web_browser$screenshot(
filename = png,
selector = "div.remark-slide-scaler",
scale = 2
)
web_browser$close()
resize <- function(path_in, path_out) {
image <- image_read(path_in)
image <- image_resize(image, "384x")
image_write(image, path_out)
}
resize(png, thumb)
}
```