library(knitr) library(rmdformats) ## Global options options(max.print = "75") knitr::opts_chunk$set( echo = FALSE, cache = FALSE, prompt = FALSE, tidy = FALSE, comment = NA, message = FALSE, warning = FALSE ) opts_knit$set(width = 75)
Here is a sample code chunk, just to show that syntax highlighting works as expected.
say_hello <- function (name) { paste("Hello,", name, "!") } say_hello("world")
Here is the structure of the penguins
dataset.
library(palmerpenguins) str(penguins)
Sample table output.
tab <- table(penguins$island, penguins$species) kable(tab)
Sample DT:datatable
output.
library(DT) DT::datatable(penguins)
Here is a crosstab displayed in several different ways with a "pills"
interface. To do this, just pass your table()
result to the pilltabs()
function.
tab <- table(penguins$sex, penguins$species) pilltabs(tab)
A simple list :
A blockquote :
Oh ! What a nice blockquote you have here. Much more wonderful than a classical Lorem Ipsum, really.
And we could also include links or simply URLs like this : https://www.r-project.org/
An incredibly complex equation :
$$ y = \sqrt{\frac{1}{x + \beta}} $$
Here is an histogram.
library(ggplot2) ggplot(data = penguins) + geom_histogram(aes(x = body_mass_g)) + facet_grid(species~.)
And a wonderful scatterplot, with a caption.
ggplot(data = penguins) + geom_point(aes(x = bill_length_mm, y = bill_depth_mm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.