From 3a14595faf6cccb81b233f4938a1078ee9b2823e Mon Sep 17 00:00:00 2001 From: Quarto GHA Workflow Runner Date: Sat, 30 Sep 2023 23:43:50 +0000 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- documents/pdf/index.pdf | Bin 35745 -> 35746 bytes documents/webr/index.html | 504 ++++---------------------------------- search.json | 10 +- sitemap.xml | 14 +- 5 files changed, 64 insertions(+), 466 deletions(-) diff --git a/.nojekyll b/.nojekyll index 7c0fc4f..6b27bef 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -da7f2af9 \ No newline at end of file +9de1e42b \ No newline at end of file diff --git a/documents/pdf/index.pdf b/documents/pdf/index.pdf index 5756909fd332308f8a5eb3b627150fe7d9e555c2..436e3e355a41aae4c4cd65ec2f1640ab71316c11 100644 GIT binary patch delta 3919 zcmai$S2!C0qlP<(3Nndj zs8M^>7DfI4#kn}=>fF5-@74Fb7hhibHA4Ee>H|HroT@7Dg+J28(Hj^vWj8$F87T## z*=<3?5_$6}HV>Hc#%NtODu#d2>=qU~SPskQX_$Pl(YB6hI{P!R`237gU&XEP_g9FL z?f1Xvppx?_T92B2U$gJmHtn9ybz%N~@S;g`VQ|`+zz5+E6Ds84(4h{Q<2>qh!))?~ z)u?MhyJ$dO_R@D{;Q<51+l6}%2TQmNo3YQ4GKg?wn#BQ5NucxdDOhvzOH8e1-dnrLohACi)PRy+>zTcWJbX-Xuk-S^F=4||WagF{?m6N}gkz~Et8SW?t zVm3O{{q6{TA9_<@R>|O|2S(=4Z8yFOBcO|q^Z$(eUqZk=fDkBH3jANdAq>D*p}1rN zcJ#@lbR5^T4>fbMb!N3setq?XoPu3$7t>MRT)2>Mm=*Z--0VeC-{rTk%yjFUOySdp z=1}#Dy1GeJKI@GqUMUQ4fGNgN=rS%X3p{hX>2yh4BjfX>EkpNe((jL+O^M|FsGmW< z1A`UV_W%Op=3(vJRPrw}pPYn$sUHoXaYu7qiNfh0MYeUog7_K_e0ZjxJK5IOrS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c2!-U$5vH+ znOoiIYhYE=;kQ*ohbyZ~opi0*I{CD^(zm5s`tc|756|HoHwebR-enabled code cells -
-

1 Demo

+
+

1 Installation

+

Install webr extension for qurto by running:

+
quarto add coatless/quarto-webr
+

then add to yaml:

+
webr:
+   channel-type: "post-message"
+engine: knitr
+filters:
+  - webr

webR-enabled code cell are established by using {webr-r} in a Quarto HTML document.

@@ -934,7 +942,19 @@

2.3 Packages

2.3.1 Available Packages

-

You can view what packages are available for webR by either executing the following R code (either with WebR or just R):

+

You can view what packages are available for webR by either executing the following R code (either with WebR or just R). This chunk is an R chunk that is not evaluated.

+
+
available.packages(
+  repos = "https://repo.r-wasm.org/",
+  type = "source"
+)[, c("Package", "Version")]
+
+

Or, by navigating to the WebR repository:

+

https://github.com/r-wasm/webr-repo/blob/main/repo-packages

+
+
+

2.3.2 Installing a Package

+

Installing ggplot2 may take at least 2 minutes to run.

@@ -954,10 +974,7 @@

-

Or, by navigating to the WebR repository:

-

https://github.com/r-wasm/webr-repo/blob/main/repo-packages

-
-

2.3.2 Installing a Package

-

Installing ggplot2 may take at least 2 minutes to run.

+
+

2.3.3 Using a Package

+

Once ggplot2 is loaded, then use the package as normal.

@@ -1167,7 +1182,10 @@

< let editor; require(['vs/editor/editor.main'], function () { editor = monaco.editor.create(editorDiv, { - value: `webr::install("ggplot2")`, + value: `library(ggplot2) + +p <- ggplot(mpg, aes(class, hwy)) +p + geom_boxplot()`, language: 'r', theme: 'vs-light', automaticLayout: true, // TODO: Could be problematic for slide decks @@ -1353,9 +1371,9 @@

< };

-
-

2.3.3 Using a Package

-

Once ggplot2 is loaded, then use the package as normal.

+
+
+

2.4 Define variables and re-use them in later cells

@@ -1375,10 +1393,8 @@

-

-
-
-

2.4 Define variables and re-use them in later cells

@@ -1586,8 +1598,7 @@

+

2.5 Escape characters in a string

@@ -1791,7 +1805,8 @@

-

2.5 Escape characters in a string

+
+

2.6 Anonymous function definition

@@ -1998,8 +2013,8 @@

-

2.6 Anonymous function definition

+
+

2.7 Empty code cell

@@ -2202,214 +2217,6 @@

{ - const contentHeight = editor.getContentHeight(); - // We're avoiding a width change - //editorDiv.style.width = `${width}px`; - editorDiv.style.height = `${contentHeight}px`; - try { - ignoreEvent = true; - - // The key to resizing is this call - editor.layout(); - } finally { - ignoreEvent = false; - } - }; - - // Helper function to check if selected text is empty - function isEmptyCodeText(selectedCodeText) { - return (selectedCodeText === null || selectedCodeText === undefined || selectedCodeText === ""); - } - - // Registry of keyboard shortcuts that should be re-added to each editor window - // when focus changes. - const addWebRKeyboardShortCutCommands = () => { - // Add a keydown event listener for Shift+Enter to run all code in cell - editor.addCommand(monaco.KeyMod.Shift | monaco.KeyCode.Enter, () => { - - // Retrieve all text inside the editor - executeCode(editor.getValue()); - }); - - // Add a keydown event listener for CMD/Ctrl+Enter to run selected code - editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, () => { - - // Get the selected text from the editor - const selectedText = editor.getModel().getValueInRange(editor.getSelection()); - // Check if no code is selected - if (isEmptyCodeText(selectedText)) { - // Obtain the current cursor position - let currentPosition = editor.getPosition(); - // Retrieve the current line content - let currentLine = editor.getModel().getLineContent(currentPosition.lineNumber); - - // Propose a new position to move the cursor to - let newPosition = new monaco.Position(currentPosition.lineNumber + 1, 1); - - // Check if the new position is beyond the last line of the editor - if (newPosition.lineNumber > editor.getModel().getLineCount()) { - // Add a new line at the end of the editor - editor.executeEdits("addNewLine", [{ - range: new monaco.Range(newPosition.lineNumber, 1, newPosition.lineNumber, 1), - text: "\n", - forceMoveMarkers: true, - }]); - } - - // Run the entire line of code. - executeCode(currentLine); - - // Move cursor to new position - editor.setPosition(newPosition); - } else { - // Code to run when Ctrl+Enter is pressed with selected code - executeCode(selectedText); - } - }); - } - - // Register an on focus event handler for when a code cell is selected to update - // what keyboard shortcut commands should work. - // This is a workaround to fix a regression that happened with multiple - // editor windows since Monaco 0.32.0 - // https://github.com/microsoft/monaco-editor/issues/2947 - editor.onDidFocusEditorText(addWebRKeyboardShortCutCommands); - - // Register an on change event for when new code is added to the editor window - editor.onDidContentSizeChange(updateHeight); - - // Manually re-update height to account for the content we inserted into the call - updateHeight(); - }); - - // Function to execute the code (accepts code as an argument) - async function executeCode(codeToRun) { - // Disable run button for code cell active - runButton.disabled = true; - - // Create a canvas variable for graphics - let canvas = undefined; - - // Initialize webR - await globalThis.webR.init(); - - // Setup a webR canvas by making a namespace call into the {webr} package - await webR.evalRVoid("webr::canvas(width=504, height=360)"); - - // Capture output data from evaluating the code - const result = await webRCodeShelter.captureR(codeToRun, { - withAutoprint: true, - captureStreams: true, - captureConditions: false//, - // env: webR.objs.emptyEnv, // maintain a global environment for webR v0.2.0 - }); - - // Start attempting to parse the result data - try { - - // Stop creating images - await webR.evalRVoid("dev.off()"); - - // Merge output streams of STDOUT and STDErr (messages and errors are combined.) - const out = result.output.filter( - evt => evt.type == "stdout" || evt.type == "stderr" - ).map((evt) => evt.data).join("\n"); - - // Clean the state - const msgs = await webR.flush(); - - // Output each image stored - msgs.forEach(msg => { - // Determine if old canvas can be used or a new canvas is required. - if (msg.type === 'canvas'){ - // Add image to the current canvas - if (msg.data.event === 'canvasImage') { - canvas.getContext('2d').drawImage(msg.data.image, 0, 0); - } else if (msg.data.event === 'canvasNewPage') { - // Generate a new canvas element - canvas = document.createElement("canvas"); - canvas.setAttribute("width", 2 * 504); - canvas.setAttribute("height", 2 * 360); - canvas.style.width = "700px"; - canvas.style.display = "block"; - canvas.style.margin = "auto"; - } - } - }); - - // Nullify the outputDiv of content - outputDiv.innerHTML = ""; - - // Design an output object for messages - const pre = document.createElement("pre"); - if (/\S/.test(out)) { - // Display results as text - const code = document.createElement("code"); - code.innerText = out; - pre.appendChild(code); - } else { - // If nothing is present, hide the element. - pre.style.visibility = "hidden"; - } - outputDiv.appendChild(pre); - - // Place the graphics on the canvas - if (canvas) { - const p = document.createElement("p"); - p.appendChild(canvas); - outputDiv.appendChild(p); - } - } finally { - // Clean up the remaining code - webRCodeShelter.purge(); - runButton.disabled = false; - } - } - - // Add a click event listener to the run button - runButton.onclick = function () { - executeCode(editor.getValue()); - }; - -

-
-

2.7 Empty code cell

- -
-
-

-
-
-
-

2.8 Prior code cell

-
- -
-
-

-
- -
-
-
-

2.9 Pre-rendered code cell

+
+

2.8 Pre-rendered R code cell

-
message("Hello!")
+
message("Hello!")
Hello!
diff --git a/search.json b/search.json index 79667c0..a70986d 100644 --- a/search.json +++ b/search.json @@ -39,21 +39,21 @@ "href": "documents/webr/index.html", "title": "webR-enabled code cells", "section": "", - "text": "webR-enabled code cell are established by using {webr-r} in a Quarto HTML document.\nLoading\n webR..." + "text": "Install webr extension for qurto by running:\nquarto add coatless/quarto-webr\nthen add to yaml:\nwebr:\n channel-type: \"post-message\"\nengine: knitr\nfilters:\n - webr\nwebR-enabled code cell are established by using {webr-r} in a Quarto HTML document.\nLoading\n webR..." }, { - "objectID": "documents/webr/index.html#demo", - "href": "documents/webr/index.html#demo", + "objectID": "documents/webr/index.html#installation", + "href": "documents/webr/index.html#installation", "title": "webR-enabled code cells", "section": "", - "text": "webR-enabled code cell are established by using {webr-r} in a Quarto HTML document.\nLoading\n webR..." + "text": "Install webr extension for qurto by running:\nquarto add coatless/quarto-webr\nthen add to yaml:\nwebr:\n channel-type: \"post-message\"\nengine: knitr\nfilters:\n - webr\nwebR-enabled code cell are established by using {webr-r} in a Quarto HTML document.\nLoading\n webR..." }, { "objectID": "documents/webr/index.html#sample-cases", "href": "documents/webr/index.html#sample-cases", "title": "webR-enabled code cells", "section": "2 Sample cases", - "text": "2 Sample cases\n\n2.1 Fit a linear regression model\nLoading\n webR...\n\n\n \n\n\n\n\n2.2 Create a graph with base R\nLoading\n webR...\n\n\n \n\n\n\n\n2.3 Packages\n\n2.3.1 Available Packages\nYou can view what packages are available for webR by either executing the following R code (either with WebR or just R):\nLoading\n webR...\n\n\n \n\n\nOr, by navigating to the WebR repository:\nhttps://github.com/r-wasm/webr-repo/blob/main/repo-packages\n\n\n2.3.2 Installing a Package\nInstalling ggplot2 may take at least 2 minutes to run.\nLoading\n webR...\n\n\n \n\n\n\n\n2.3.3 Using a Package\nOnce ggplot2 is loaded, then use the package as normal.\nLoading\n webR...\n\n\n \n\n\n\n\n\n2.4 Define variables and re-use them in later cells\nLoading\n webR...\n\n\n \n\n\nLoading\n webR...\n\n\n \n\n\n\n\n2.5 Escape characters in a string\nLoading\n webR...\n\n\n \n\n\n\n\n2.6 Anonymous function definition\nLoading\n webR...\n\n\n \n\n\n\n\n2.7 Empty code cell\nLoading\n webR...\n\n\n \n\n\n\n\n2.8 Prior code cell\n\nLoading\n webR...\n\n\n \n\n\n\n\n\n2.9 Pre-rendered code cell\n\nmessage(\"Hello!\")\n\nHello!\n\n\nwebr extension version: 0.3.6" + "text": "2 Sample cases\n\n2.1 Fit a linear regression model\nLoading\n webR...\n\n\n \n\n\n\n\n2.2 Create a graph with base R\nLoading\n webR...\n\n\n \n\n\n\n\n2.3 Packages\n\n2.3.1 Available Packages\nYou can view what packages are available for webR by either executing the following R code (either with WebR or just R). This chunk is an R chunk that is not evaluated.\n\navailable.packages(\n repos = \"https://repo.r-wasm.org/\",\n type = \"source\"\n)[, c(\"Package\", \"Version\")]\n\nOr, by navigating to the WebR repository:\nhttps://github.com/r-wasm/webr-repo/blob/main/repo-packages\n\n\n2.3.2 Installing a Package\nInstalling ggplot2 may take at least 2 minutes to run.\nLoading\n webR...\n\n\n \n\n\n\n\n2.3.3 Using a Package\nOnce ggplot2 is loaded, then use the package as normal.\nLoading\n webR...\n\n\n \n\n\n\n\n\n2.4 Define variables and re-use them in later cells\nLoading\n webR...\n\n\n \n\n\nLoading\n webR...\n\n\n \n\n\n\n\n2.5 Escape characters in a string\nLoading\n webR...\n\n\n \n\n\n\n\n2.6 Anonymous function definition\nLoading\n webR...\n\n\n \n\n\n\n\n2.7 Empty code cell\nLoading\n webR...\n\n\n \n\n\n\n\n2.8 Pre-rendered R code cell\n\nmessage(\"Hello!\")\n\nHello!\n\n\nwebr extension version: 0.3.6" }, { "objectID": "documents/ojs/index.html", diff --git a/sitemap.xml b/sitemap.xml index d2b210c..e61b97f 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,30 +2,30 @@ https://github.com/royfrancis/quarto-exp/index.html - 2023-09-30T23:18:32.773Z + 2023-09-30T23:43:50.206Z https://github.com/royfrancis/quarto-exp/documents/report/index.html - 2023-09-30T23:18:32.013Z + 2023-09-30T23:43:49.594Z https://github.com/royfrancis/quarto-exp/documents/webr/index.html - 2023-09-30T23:18:20.837Z + 2023-09-30T23:43:40.529Z https://github.com/royfrancis/quarto-exp/documents/ojs/index.html - 2023-09-30T23:18:14.221Z + 2023-09-30T23:43:34.957Z https://github.com/royfrancis/quarto-exp/documents/fontawesome/index.html - 2023-09-30T23:18:11.601Z + 2023-09-30T23:43:32.913Z https://github.com/royfrancis/quarto-exp/documents/revealjs/index.html - 2023-09-30T23:18:18.577Z + 2023-09-30T23:43:38.729Z https://github.com/royfrancis/quarto-exp/documents/theme-title/index.html - 2023-09-30T23:18:32.365Z + 2023-09-30T23:43:49.878Z