From 15ee67a52e9b479cafcbae474078557df2ac5d42 Mon Sep 17 00:00:00 2001 From: Daniel Winkler Date: Thu, 11 Sep 2025 22:57:47 +1000 Subject: [PATCH] added package testing --- .github/workflows/check.yml | 2 +- test/test.R | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/test.R diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c8c8ad3..5530fba 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -28,4 +28,4 @@ jobs: extraPullNames: rstats-on-nix, nix-community - run: nix build . - run: nix flake check . --all-systems - - run: nix develop -c "R -e 'library(httpgd)'" + - run: nix develop -c Rscript test/test.R diff --git a/test/test.R b/test/test.R new file mode 100644 index 0000000..80b1a40 --- /dev/null +++ b/test/test.R @@ -0,0 +1,14 @@ +library(httpgd) +hgd() + +library(musicMetadata) +print(classify_labels('Interscope')) + +library(nvimcom) + +library(synthdid) +data('california_prop99') +setup = panel.matrices(california_prop99) +tau.hat = synthdid_estimate(setup$Y, setup$N0, setup$T0) +se = sqrt(vcov(tau.hat, method='placebo')) +sprintf('95%% CI (%1.2f, %1.2f)', tau.hat - 1.96 * se, tau.hat + 1.96 * se)