brew install datalad wgetFirst, we create a new, empty dataset. (Reminder: a dataset refers to a folder
of files, not any single file.)
| # source: Matt Dray's blog: https://www.rostrum.blog/posts/2021-10-05-gorilla/ | |
| library(magick) | |
| # download and read the image | |
| img_file <- tempfile(fileext = ".jpg") | |
| download.file( | |
| paste0( | |
| "https://classroomclipart.com/images/gallery/", | |
| "Clipart/Black_and_White_Clipart/Animals/", |
Excerpted from Greenland et al, Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations, 2016
| brew install duckdb | |
| duckdb -c "INSTALL httpfs" | |
| REMOTE_FILE="https://raw.githubusercontent.com/mwaskom/seaborn-data/master/penguins.csv" | |
| # read a remote CSV file in to a duckdb database into an in-memory database | |
| duckdb -c "SELECT * FROM '${REMOTE_FILE}';" | |
| # By default, the CLI will open a temporary in-memory database. |
| --- | |
| title: "Controlled vocabulary for sequencing experiments" | |
| --- | |
| ```{r, include = FALSE} | |
| knitr::opts_chunk$set( | |
| collapse = TRUE, | |
| comment = "#>" | |
| ) | |
| ``` |
| --- | |
| title: "Experimenting with SQLite" | |
| editor_options: | |
| chunk_output_type: inline | |
| --- | |
| ```{r} | |
| library(glue) | |
| library(RSQLite) | |
| library(jsonlite) |
| library(AnnotationDbi) | |
| library(org.Hs.eg.db) | |
| library(GO.db) | |
| kTerm <- "GO:0007265" | |
| # retrieve all genes annotated with the GO germ | |
| df <- AnnotationDbi::select(org.Hs.eg.db, keys = c(kTerm), | |
| columns = c("ENTREZID", "ENSEMBL"), | |
| keytype = "GO") | |
| nrow(df) # 117 (some duplicate EntrezIds because we requested Ensembl ids, too) |
| --- | |
| output: html_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = FALSE) | |
| library(crosstalk) | |
| library(gsisdecoder) # for nflfastR::build_nflfastR_pbp | |
| library(htmltools) | |
| library(nflfastR) |
| --- | |
| title: "DT, plotly and crosstalk" | |
| --- | |
| ```{r} | |
| library(plotly) | |
| library(DT) | |
| library(crosstalk) | |
| library(htmltools) | |
| ``` |
| --- | |
| title: "Presenting gene set enrichment results with reactable and plotly" | |
| format: | |
| html: | |
| page-layout: full | |
| code-fold: true | |
| code-summary: "Show the code" | |
| --- | |
| ```{r} |