# WARNING - Generated by {fusen} from /dev/flat_full.Rmd: do not edit by hand
# Test with your dataset in "inst/"
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)
test_that("ggsmatr works properly and show error if needed", {
expect_visible(ggsmatr(data = df.iris, groups = "Species", xvar = "Sepal.Width", yvar = "Sepal.Length", sma.fit = fit))
expect_error(ggsmatr(data = df.iris, groups = "Species", xvar = "Sepal.Width", yvar = "Sepal.Length"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.