library(testthat)
library(ggplot2)
data = system.file('extdata', 'earthquakesData.tsv', package ='masteringSoftwareDevelopmentinR')
data = read_data(data)
cleanedData <- eq_clean_data(data)
test_that('output is a ggplot',{
g = ggplot(cleanedData,aes(x = datetime,
size = Mag,
color = DEATHS,
fill = DEATHS))
expect_s3_class(g, 'ggplot')
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.