From 393f79e07052438de27fbd30905efcd5c53d7d6d Mon Sep 17 00:00:00 2001 From: Kunzmann Date: Fri, 7 Jul 2023 12:48:57 +0000 Subject: [PATCH] added r proj infrastructure and a first json file describing an individual test case --- .gitignore | 4 ++++ rmes.Rproj | 13 +++++++++++++ tests/testCase1.json | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .gitignore create mode 100644 rmes.Rproj create mode 100644 tests/testCase1.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/rmes.Rproj b/rmes.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/rmes.Rproj @@ -0,0 +1,13 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX diff --git a/tests/testCase1.json b/tests/testCase1.json new file mode 100644 index 0000000..242420e --- /dev/null +++ b/tests/testCase1.json @@ -0,0 +1,16 @@ +{ + "type": "TestCase", + "uuid": "4fa03a8d-2e39-4866-9cd3-69b77bd78a6b", + "testName": "t test produces calibrated p values", + "keywords": ["t-test", "p value", "statistics"], + "description": "This test checks that the p values produced by stats::t.test do not deviate substantially from the expected uniform distribution.", + "references:" "", + "code": "set.seed(42)\nm <- 100\nfor (n in c(5, 50, 500)) {\n# repeatedly sample data under null and record p value\nres <- numeric(m)\nfor (i in 1:m) {\nres[i] <- t.test(rnorm(n))$p.value\n}\n# expect non significant result\nexpect_true(\nks.test(res, 'punif')$p.value > 0.05\n)\n}", + "output": "", + "environment": { + "container": "rocker/tidyverse:4.3.1", + "runtime": "singularity", + "runtimeVersion": "3.8", + "renvLockfile": "" + } +} \ No newline at end of file