Some R code:
Some German characters äößü
dat <- 1:20 s <- 0 for (i in seq_along(dat)) { s <- s + dat[i] }
Inline R
code: calc_rule(dat, k)
, and now a block of R
code:
hist(dat, breaks = n) var(dat) myfun <- function (a) { mean(a) }
Some invalid R
code but still in typewriter font is data1.
Another, a bit more tedious way to show R
code could be
a <- 1:10
print(a)
For some reason, code in the answerlist only works if it's already formatted as HTML
There is some feedback here.
exname: R Code extype: mchoice exsolution: 100 exshuffle: TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.