File: example1.R

package info (click to toggle)
r-cran-simplermarkdown 0.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 392 kB
  • sloc: makefile: 2
file content (32 lines) | stat: -rw-r--r-- 426 bytes parent folder | download
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
# codeblock1
a <- 1+1
b <- mean(a) + 10
# Dit is commentaat
c <- a+b
c
dta <- iris

# <unlabeled code block>
dta$foo <- dta$Sepal.Width/dta$Sepal.Length
dta[1:20, ]

# <unlabeled code block>
warning("FOO")
plot(dta$Sepal.Width, dta$Petal.Width)

# <unlabeled code block>
md_figure({
plot(dta$Sepal.Length, dta$Petal.Length)
}, name = "foo")

# nooutput1
a <- 1+1
a

# nooutput2
a <- 1+1
a

# dontrun
stop("Dit is een error")