-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
38 lines (28 loc) · 749 Bytes
/
main.js
File metadata and controls
38 lines (28 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* @module main
*/
// we need to render the markdown as quickly as possible
import { renderMarkdownInBody } from "./renderers.js";
await renderMarkdownInBody(
`main`,
"ayu-dark",
[ 'javascript', 'r', 'json', 'xml', 'console' ],
false
)
import "./wc/status-message.js"
import './wc/file-drop.js'
import './wc/file-target.js'
let message = document.getElementById("status");
message.text = "WebR Loading…"
import * as R from "./r.js";
message.text = "Installing packages…"
await R.webR.installPackages(["svglite", "xtable"])
await R.installRUniversePackages("basetheme")
await R.webR.evalRVoid(`
library(svglite)
library(xtable)
library(basetheme)
library(datasets)
`)
message.text = "Web R Initialized!"
message.text = "Ready"