added summclust

This commit is contained in:
Daniel Winkler 2026-01-19 13:50:08 +11:00
commit 1be041433c
7 changed files with 43 additions and 40 deletions

View file

@ -27,5 +27,4 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: rstats-on-nix, nix-community
- run: nix build .
# - run: nix run .#default -- "-e q('no')"
- run: nix develop -c Rscript test/test.R

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
**/.DS_Store

27
flake.lock generated
View file

@ -2,40 +2,23 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1761180068,
"narHash": "sha256-6/Z0navtnd+duYqZ0L9vk2dAavsiMj+UgKRPp0NQ/2M=",
"lastModified": 1762778295,
"narHash": "sha256-5Ogu11rMpc3ytcfBLwO3O1l1MJl0pTT+uCz/OJixmVo=",
"owner": "rstats-on-nix",
"repo": "nixpkgs",
"rev": "41adefaa04626b6bc98ffcfdbf821f37bf4aa964",
"rev": "b37b5950aa970ed7abe27144f2ca62e6029215e5",
"type": "github"
},
"original": {
"owner": "rstats-on-nix",
"ref": "r-daily",
"ref": "2025-11-10",
"repo": "nixpkgs",
"type": "github"
}
},
"nvimcom": {
"flake": false,
"locked": {
"lastModified": 1760650130,
"narHash": "sha256-KgvK2tR6C97Z1WEUbVNHzAe6QKUg0T5FLB9HwO3eay4=",
"owner": "R-nvim",
"repo": "R.nvim",
"rev": "fef990378e4b5157f23314dca4136bc0079cc2c4",
"type": "github"
},
"original": {
"owner": "R-nvim",
"repo": "R.nvim",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"nvimcom": "nvimcom"
"nixpkgs": "nixpkgs"
}
}
},

View file

@ -2,11 +2,7 @@
description = "FRAN - The Flakey R Archiving Network";
inputs = {
nixpkgs.url = "github:rstats-on-nix/nixpkgs/r-daily";
nvimcom = {
url = "github:R-nvim/R.nvim";
flake = false;
};
nixpkgs.url = "github:rstats-on-nix/nixpkgs/2025-11-10";
};
outputs = {
@ -65,10 +61,10 @@
Matrix
Rcpp
rlang
summclust
RcppArmadillo
RcppEigen
;
;
inherit (final.extraRPackages) summclust;
};
}).overrideAttrs (old: {
passthru = (old.passthru or {}) // {juliaPackages = ["WildBootTests" "StableRNGs"];};
@ -95,18 +91,26 @@
};
## N
nvimcom = prev.rPackages.buildRPackage {
name = "nvimcom";
src = inputs.nvimcom;
sourceRoot = "source/nvimcom";
buildInputs = with prev; [
R
stdenv.cc.cc
gnumake
];
};
## S
summclust = prev.rPackages.buildRPackage {
name = "summclust";
src = fetchfromGitHubJSONFile ./versions/summclust.json;
propagatedBuildInputs = builtins.attrValues {
inherit
(prev.rPackages)
dreamerr
MASS
collapse
generics
cli
rlang
;
};
};
synthdid = prev.rPackages.buildRPackage {
name = "synthdid";
src = fetchfromGitHubJSONFile ./versions/synthdid.json;
@ -150,6 +154,11 @@
franUpdate
];
};
newPkg = pkgs.mkShell {
packages = with self.packages."${system}"; [
franUpdate
];
};
}
);
};

View file

@ -41,6 +41,10 @@ print(classify_labels('Interscope'))
cat("\n============================================================ nvimcom ============================================================\n")
library(nvimcom)
cat("\n============================================================ summclust ============================================================\n")
library(summclust)
summclust(lm_fit, cluster = ~group_id1, params = "treatment")
cat("\n============================================================ synthdid ============================================================\n")
library(synthdid)
data('california_prop99')

View file

@ -3,5 +3,6 @@ pkgs: ''
$pg --json hannesdatta musicMetadata > versions/musicMetadata.json
$pg --json nx10 httpgd > versions/httpgd.json
$pg --json s3alfisc fwildclusterboot > versions/fwildclusterboot.json
$pg --json s3alfisc summclust > versions/summclust.json
$pg --json synth-inference synthdid > versions/synthdid.json
''

6
versions/summclust.json Normal file
View file

@ -0,0 +1,6 @@
{
"owner": "s3alfisc",
"repo": "summclust",
"rev": "2d25c68eb046028b680fdc8c9827820f7e791827",
"hash": "sha256-JY5AwKZ6vDSKwWfQVVxZlqzpJwk+ibHw40l4sue0lfs="
}