library(testthat)
library(iregnet)
library(ggplot2)
require(ElemStatLearn)
context("\nplot")
data(prostate,package="ElemStatLearn")
pros <- subset(prostate,select=-train,train==TRUE)
y.mat <- cbind(pros$lpsa, pros$lpsa)
X.mat <- as.matrix(subset(pros, select=-lpsa))
fit <- iregnet(X.mat, y.mat)
gg <- plot(fit)
test_that("plot method returns ggplot", {
expect_true(is.ggplot(gg))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.