Public
Edited
Jul 2, 2024
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mutable loaded = false
Insert cell
webR = {
// Set up webR
let { WebR, ChannelType } = await import('https://webr.r-wasm.org/latest/webr.mjs');
let webR = new WebR({ channelType: ChannelType.PostMessage });
await webR.init();
await webR.evalR('set.seed(1234)');
mutable loaded = true;
return webR;
}
Insert cell
shelter = {
return new webR.Shelter();
}
Insert cell
{
document.getElementById('loadedContent').style.display = loaded ? 'block' : 'none';
document.getElementById('loadingContent').style.display = loaded ? 'none' : 'block';
}
Insert cell
{
weak;
mutable beta_val = 0.5;
mutable gamma_val = .2;
mutable cor_val = .6;
}
Insert cell
{
exogeneous;
mutable beta_val = 0.5;
mutable gamma_val = 2;
mutable cor_val = 0;
}
Insert cell
{
beta1zero;
mutable beta_val = 0;
mutable gamma_val = 2;
mutable cor_val = -.8;
}
Insert cell
mutable beta_val = 0.5;
Insert cell
mutable cor_val = -.8;
Insert cell
mutable gamma_val = 2;
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