Skip to content

Commit 4a90985

Browse files
edavidajadotNomad
andauthored
example: python, quarto, r (#274)
Co-authored-by: Jordan Jensen <[email protected]>
1 parent bde5276 commit 4a90985

File tree

12 files changed

+3940
-1
lines changed

12 files changed

+3940
-1
lines changed

.github/workflows/extensions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
simple-mcp-server: extensions/simple-mcp-server/**
5959
simple-shiny-chat-with-mcp: extensions/simple-shiny-chat-with-mcp/**
6060
chat-with-content: extensions/chat-with-content/**
61+
pqr: extensions/pqr/**
6162
6263
# Runs for each extension that has changed from `simple-extension-changes`
6364
# Lints and packages in preparation for tests and and release.

extensions.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"fastapi",
1818
"mcp",
1919
"llm",
20-
"chat"
20+
"chat",
21+
"quarto",
22+
"r"
2123
],
2224
"requiredFeatures": [
2325
"API Publishing",

extensions/pqr/.Rprofile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source("renv/activate.R")

extensions/pqr/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# pqr
2+
3+
A Quarto document that executes Python and R code.

extensions/pqr/index.qmd

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: pqr
3+
---
4+
5+
This Quarto document executes Python and R code.
6+
7+
## R code
8+
9+
```{r}
10+
library(tinyplot)
11+
library(reticulate) # rstudio/renv#2174
12+
tinytheme("ridge2")
13+
14+
aq = transform(
15+
airquality,
16+
Month = factor(month.abb[Month], levels = month.abb[5:9]),
17+
Month2 = factor(month.name[Month], levels = month.name[5:9]),
18+
Late = ifelse(Day > 15, "Late", "Early")
19+
)
20+
21+
tinyplot(Month ~ Temp | Temp,
22+
data = aq,
23+
type = type_ridge(col = "white")
24+
)
25+
```
26+
27+
28+
## Python code
29+
30+
```{python}
31+
from plotnine import *
32+
from plotnine.data import anscombe_quartet
33+
34+
p = (ggplot(anscombe_quartet, aes("x", "y", color="dataset")) + geom_point())
35+
36+
p.show()
37+
```

extensions/pqr/manifest.json

Lines changed: 1132 additions & 0 deletions
Large diffs are not rendered by default.

extensions/pqr/renv.lock

Lines changed: 1344 additions & 0 deletions
Large diffs are not rendered by default.

extensions/pqr/renv/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
library/
2+
local/
3+
cellar/
4+
lock/
5+
python/
6+
sandbox/
7+
staging/

0 commit comments

Comments
 (0)