Description Usage Arguments See Also Examples
Run tests under given location
1 2 |
ddtsDir |
(characters) path where tests inputs and outputs should be stored |
preload |
(function) loading function |
compare |
(function) compared of actual and expected objects |
expectedFileName |
(character) generated file |
readSaveObj |
(list of functions ) |
Other ddtRun: ddtRunSingle
1 2 3 4 5 6 7 8 9 10 11 | ddtsDir <- './tests/example_in_doc/testCase_1' #location where single DDT is
x <- 1:20
y <- x*2 + rnorm(20)
preload <- function(){ return(lm(y~x)) }
compare <- function(expected, actual){
if(all(abs(expected$coefficients - actual$coefficients) < 0.001) ){
print("Same")
} else {
stop("wrong coefficents. Expected ", expected$coefficients , " but is ", actual$coefficients)
}}
# ddtRun(ddtsDir, preload, compare) # run all test
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.