Skip to content

Instantly share code, notes, and snippets.

@matiskay
Created April 19, 2014 00:14
Show Gist options
  • Save matiskay/11069313 to your computer and use it in GitHub Desktop.
Save matiskay/11069313 to your computer and use it in GitHub Desktop.
library('testthat');
test_that('The Standard Desviation of n numbers', {
x <- c(1, 2, 3, 4, 5, 6, 7, 8);
sd <- sd(x);
expect_that(sd, equals(2.449490))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment