Public
Edited
Aug 18, 2024
2 forks
Importers
15 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof nCells = Inputs.range([1, 100], { value: 10, step: 1, label: "# Cells" })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
webR = {
const { WebR, ChannelType } = await import(
"https://cdn.jsdelivr.net/npm/webr/dist/webr.mjs"
);

const intWebR = new WebR({
channelType: ChannelType.PostMessage,
interactive: false
});

await intWebR.init();

// Things seem to work better if you load the pkgs here

await intWebR.installPackages(
["jsonlite", "dplyr", "scales", "ggplot2", "svglite"],
true
);

await intWebR.evalRVoid(`
library(dplyr)
library(ggplot2)
library(svglite)
`);

document.querySelector("#loader").innerText = "🟢";
document.querySelector("#msg").innerText = "WebR loaded!";

return intWebR;
}
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more