tests/testthat/test_violin_names.R

library("vioplot")
context("names input")

test_that("list input", {
  data(iris)
  vioplot(iris$Sepal.Length[iris$Species=="setosa"], iris$Sepal.Length[iris$Species=="versicolor"], iris$Sepal.Length[iris$Species=="virginica"], names=c("a", "b", "c"))
})


test_that("naming formulae", {
  data(iris)
  vioplot(iris$Sepal.Length~iris$Species, names=c("a", "b", "c"))
  vioplot(Sepal.Length~Species, data=iris, names=c("a", "b", "c"))
  })

Try the vioplot package in your browser

Any scripts or data that you put into this service are public.

vioplot documentation built on Dec. 10, 2022, 1:12 a.m.