knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(corrplot)
We will use the datasets::iris
dataset for example.
head(iris)
Create a scatter plot showing the relationship between Sepal.Length
and Sepal.Length
, grouped by the factor Species
. Note the correlation coefficients are annotated.
p = correlation_scatter(datasets::iris, x='Sepal.Length', y='Sepal.Width', group='Species') p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.