added package testing

This commit is contained in:
Daniel Winkler 2025-09-11 22:57:47 +10:00
commit 15ee67a52e
2 changed files with 15 additions and 1 deletions

View file

@ -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

14
test/test.R Normal file
View file

@ -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)