Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. ---
  2. title: "A simple Test Example"
  3. output: html_document
  4. ---
  5.  
  6. ```{r setup, include = FALSE}
  7. knitr::opts_chunk$set(echo = TRUE)
  8. library(testthat)
  9. library(sessioninfo)
  10. options(width = 100)
  11. ```
  12.  
  13. Test Date: `r format(Sys.time(), "%a %b %d %H:%M:%S %Y")`
  14.  
  15. ## Introduction
  16.  
  17. Some information about your application.
  18.  
  19. Any tests that fail show the error in the sections below. The lack of an error message indicates that the test passed.
  20.  
  21. ## Test 1: The sample mean
  22.  
  23. This test shows that the mean is calculated appropriately when there are no missing data:
  24.  
  25. ```{r sample-mean-test, error = TRUE}
  26. test_1_inputs <- 1:5
  27. test_1_output <- mean(1:5)
  28. expect_equal(test_1_output, 3)
  29. ```
  30.  
  31.  
  32. ## Session Information
  33.  
  34. These tests used the following R packages, their version, and source:
  35.  
  36. ```{r versions, echo = FALSE}
  37. sessioninfo::session_info()
  38. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement