Skip to content

Commit

Permalink
final reproducible environment
Browse files Browse the repository at this point in the history
  • Loading branch information
InkaSpy committed Jan 8, 2025
1 parent ca1d789 commit caf79b5
Show file tree
Hide file tree
Showing 7 changed files with 1,277 additions and 1,496 deletions.
40 changes: 40 additions & 0 deletions vignettes/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### File generated by `rix::rix_init()` ###
# 1. Currently, system RStudio does not inherit environmental variables
# defined in `$HOME/.zshrc`, `$HOME/.bashrc` and alike. This is workaround to
# make the path of the nix store and hence basic nix commands available
# in an RStudio session
# 2. For nix-R session, remove `R_LIBS_USER`, system's R user library.`.
# This guarantees no user libraries from the system are loaded and only
# R packages in the Nix store are used. This makes Nix-R behave in pure manner
# at run-time.
{
is_rstudio <- Sys.getenv("RSTUDIO") == "1"
is_nix_r <- nzchar(Sys.getenv("NIX_STORE"))
if (isFALSE(is_nix_r) && isTRUE(is_rstudio)) {
cat("{rix} detected RStudio R session")
old_path <- Sys.getenv("PATH")
nix_path <- "/nix/var/nix/profiles/default/bin"
has_nix_path <- any(grepl(nix_path, old_path))
if (isFALSE(has_nix_path)) {
Sys.setenv(PATH = paste(old_path, nix_path, sep = ":"))
}
rm(old_path, nix_path)
}
if (isTRUE(is_nix_r)) {
install.packages <- function(...) {
stop("You are currently in an R session running from Nix.\n", "Don't install packages using install.packages(),\nadd them to ", "the default.nix file instead.")
}
update.packages <- function(...) {
stop("You are currently in an R session running from Nix.\n", "Don't update packages using update.packages(),\n", "generate a new default.nix with a more recent version of R. ", "If you need bleeding edge packages, read the", "'Understanding the rPackages set release cycle and using ", "bleeding edge packages' vignette.")
}
remove.packages <- function(...) {
stop("You are currently in an R session running from Nix.\n", "Don't remove packages using `remove.packages()``,\ndelete them ", "from the default.nix file instead.")
}
current_paths <- .libPaths()
user_dir <- grep(paste(userlib_paths, collapse = "|"), current_paths, fixed = TRUE)
new_paths <- current_paths[-user_dir]
.libPaths(new_paths)
rm(current_paths, userlib_paths, user_dir, new_paths)
}
rm(is_rstudio, is_nix_r)
}
1 change: 1 addition & 0 deletions vignettes/Power_analysis_REACTIV.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Reproducing power analysis based on REACTIV validation studies of publication"
author: "Inka Marie Spyridonov"
date: "2024-12-17"
output: rmarkdwon::html_vignette
vignette: >
%\VignetteIndexEntry{Power analysis based on REACTIV validation studies}
%\VignetteEngine{knitr::rmarkdown}
Expand Down
3 changes: 2 additions & 1 deletion vignettes/Running_RADAR_analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Analysis of all RADAR validation studies"
author: "Inka Marie Spyridonov"
date: "2024-12-17"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Analysis of all RADAR validation studies}
%\VignetteEngine{knitr::rmarkdown}
Expand All @@ -21,7 +22,7 @@ rix::rix(
tex_pkgs = c("amsmath"),
git_pkgs = list(package_name = "xeredar",
repo_url = "https://github.com/basf/xeredar",
commit = "2b85763"),
commit = "ca1d789"),
ide = "rstudio",
project_path = "./vignettes",
overwrite = TRUE
Expand Down
2,708 changes: 1,225 additions & 1,483 deletions vignettes/Running_RADAR_analysis.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions vignettes/User_guide.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "User guide"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{User guide}
%\VignetteEngine{knitr::rmarkdown}
Expand Down
1 change: 1 addition & 0 deletions vignettes/creating_REACTIV_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Creating simulated REACTIV data for power analysis of publication"
author: "Inka Marie Spyridonov"
date: "2024-12-17"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Creating simulated REACTIV data for power analysis}
%\VignetteEngine{knitr::rmarkdown}
Expand Down
19 changes: 7 additions & 12 deletions vignettes/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated by the {rix} R package v0.12.4 on 2025-01-07
# This file was generated by the {rix} R package v0.12.4 on 2025-01-08
# with following call:
# >rix::rix(r_ver = "6f3340bf0f888d0fda9a3b91dd5b3a9b05d08212",
# > r_pkgs = c("tidyverse",
Expand All @@ -15,7 +15,7 @@
# > system_pkgs = NULL,
# > git_pkgs = list(package_name = "xeredar",
# > repo_url = "https://github.com/basf/xeredar",
# > commit = "2b85763"),
# > commit = "ca1d789"),
# > tex_pkgs = c("amsmath"),
# > ide = "rstudio",
# > project_path = "./vignettes",
Expand Down Expand Up @@ -46,13 +46,11 @@ let
name = "xeredar";
src = pkgs.fetchgit {
url = "https://github.com/basf/xeredar";
rev = "2b85763";
sha256 = "sha256-Yxbp8Qi3TOXFhdgZ2shRNSuN0gkermY8OEAMVwhIlp8=";
rev = "ca1d789";
sha256 = "sha256-OzTJkNdThqK9lI3IagtBD6MWt27Qo3oIObOCHBN75qA=";
};
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages)
Matrix
ARTool
broom
bslib
car
Expand All @@ -61,20 +59,17 @@ let
fBasics
ggplot2
ggpubr
gt
lme4
magrittr
MASS
multcomp
parameters
performance
readxl
rlang
tibble
tidyr
shiny
shinydashboard
shinyWidgets
tibble
tidyr;
shinyWidgets;
};
})
];
Expand Down

0 comments on commit caf79b5

Please sign in to comment.