-
Notifications
You must be signed in to change notification settings - Fork 0
/
mywebr.qmd
49 lines (38 loc) · 933 Bytes
/
mywebr.qmd
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
39
40
41
42
43
44
45
46
47
48
49
---
title: |
| My webR online calculator:
| Use R in the browser of your smartphone or tablet
author: "Florian Pargent"
lang: en
date: last-modified
date-format: "DD.MM.YYYY, HH:mm"
format: html
engine: knitr
filters:
- webr
---
---
## R console:
```{webr-r}
```
---
## Instructions:
With **webR**[^1] you can run R commands directly in your browser without having R installed on your device (like a smartphone or tablet), e.g.:
```{webr-r}
n <- 100
x <- rnorm(n, mean = 3, sd = 1)
y <- 2 + 0.5 * x + rnorm(n, mean = 0, sd = 0.1)
plot(x, y)
```
R packages can also be installed, e.g.:
```{webr-r}
pkg <- "pwr"
webr::install(pkg)
library(pkg, character.only = TRUE)
```
Current R version:
```{webr-r}
#| autorun: true
R.version$version.string
```
[^1]: This website uses [webR for Quarto](https://github.com/coatless/quarto-webr). The code for this website lies [here](https://github.com/FlorianPargent/webr_quarto).