From e7722818f4eb0bcae20e91ce3d8bb6b7a0c65623 Mon Sep 17 00:00:00 2001 From: Jonathan McPherson Date: Tue, 5 May 2026 17:16:57 -0700 Subject: [PATCH] add parameters example --- .../quarto_inline_output/parameters.qmd | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 workspaces/quarto_inline_output/parameters.qmd diff --git a/workspaces/quarto_inline_output/parameters.qmd b/workspaces/quarto_inline_output/parameters.qmd new file mode 100644 index 0000000..33a88e5 --- /dev/null +++ b/workspaces/quarto_inline_output/parameters.qmd @@ -0,0 +1,39 @@ +--- +title: "Parameters" +params: + answer: !r 6 * 7 + alpha: 0.1 + ratio: 0.1 + year: + label: "Year" + value: 2026 + input: slider + min: 2010 + max: 2050 + step: 1 + sep: "" +--- + +# The Answer + +This should be 42, which is the result of $6 * 7$, and tests evaluating R expressions as parameters. + +```{r} +params$answer +``` + +# A Small Ratio + +This should be 0.01, and tests simple scalar parameters. + +```{r} +params$alpha * params$ratio +``` + +# The Year + +This should be 2026, and tests the full parameter declaration format that includes UI information. + +```{r} +params$year +``` \ No newline at end of file