knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ggsmatr)
datafile <- system.file("iris.csv", package = "ggsmatr") df.iris <- read.csv(datafile, encoding = "UTF-8") library(ggsmatr) library(ggplot2) library(smatr) fit = sma(Sepal.Length ~ Sepal.Width + Species, data = df.iris,shift=TRUE, elev.test=TRUE) # ggsmatr(data = df.iris, groups = "Species", xvar = "Sepal.Width", yvar = "Sepal.Length", sma.fit = fit) + theme(legend.position = "top", legend.title=element_blank())+ ylab("Sepal.Length")+ xlab("Sepal.Width")+ theme(legend.position = "top")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.