# WARNING - Generated by {fusen} from /dev/flat_full.Rmd: do not edit by hand
# #importar base de datos
# data_prueba_ruta <- system.file("data_prueba.sav", package = "pulso")
# data_prueba <- haven::read_sav(data_prueba_ruta)
#
# test_that("barra_simple works", {expect_error(data_prueba %>% barra_simple(gedad, ordenado=FALSE), regexp = NA)})
test_that("my_median works properly and show error if needed", {
expect_true(my_median(1:12) == 6.5)
expect_error(my_median("text"))
})
# Test with your dataset in "inst/"
datafile <- system.file("nyc_squirrels_sample.csv", package = "pulso2")
nyc_squirrels <- read.csv(datafile)
# Apply test on my function
test_that("my_median works properly with internal dataset", {
expect_equal(my_median(nyc_squirrels[,"hectare_squirrel_number"]), 3)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.