This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snv_impl_base <- function(X) { | |
X <- as.matrix(X) | |
X <- sweep(X, 1L, rowMeans(X, na.rm = TRUE), `-`) | |
X_sc <- sweep(X, 1L, apply(X, 1L, sd, na.rm = TRUE), `/`) | |
return(X_sc) | |
} | |
snv_impl_base_mstats <- function(X) { | |
X <- as.matrix(X) | |
X <- sweep(X, 1L, matrixStats::rowMeans2(X, na.rm = TRUE), `-`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install_github("b-rodrigues/rix", ref = "71-with-nix") | |
library("rix") | |
library("dplyr") | |
library("data.table") | |
# fusen::load_flat_functions(flat_file = "dev/build_envs.Rmd") | |
# fusen::load_flat_functions(flat_file = "dev/get_os.Rmd") | |
library("rix") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file was generated by the {rix} R package v0.4.1 on 2024-01-06 | |
# with following call: | |
# >rix(r_ver = "63143ac2c9186be6d9da6035fa22620018c85932", | |
# > r_pkgs = c("dplyr", | |
# > "data.table"), | |
# > overwrite = TRUE) | |
# It uses nixpkgs' revision 63143ac2c9186be6d9da6035fa22620018c85932 for reproducibility purposes | |
# which will install R version latest | |
# Report any issues to https://github.com/b-rodrigues/rix | |
let |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMake Warning: | |
Manually-specified variables were not used by the project: | |
BUILD_TESTING | |
CMAKE_EXPORT_NO_PACKAGE_REGISTRY | |
CMAKE_POLICY_DEFAULT_CMP0025 | |
QT_QMAKE_EXECUTABLE | |
-- Build files have been written to: /tmp/nix-build-RStudio-2023.09.0+463.drv-1/source/build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!require("rix")) { | |
if (!require("remotes") install.packages("remotes") | |
remotes::install_github("b-rodrigues/rix") | |
} | |
library("rix") | |
# make sure that only nix library paths in /nix/... are used to load R packages | |
rix_init() | |
# define `default.nix` in reproducible manner (will ping nixpkgs revision on GitHub) | |
rix( |
OlderNewer