Post #1689007
2026-03-30 15:40 UTC
@lwpembleton
I do something "similar", but also different. I store the config in an R file called `config.R` and I source the the file in the beginning of my script. Something like:
```r
cfg <- list(
# some comment
input_path = "/some/path",
output_path = "/some/path",
# define some of the cutoffs for blah
cutoffs = list(
fdr = .05,
logfc = 1.5
)
)
```
The advantage is that it is easy to debug, zero dependency, can contain comments.
@drdcarpenter @mschmidty
Replies (1)
-
@nxskok@cupoftea.social 2026-03-30 15:53
@Mehrad @lwpembleton @drdcarpenter @mschmidty I like the idea of using a list for this. I was reminded of somebody who suggested using lists to store results that you are going to give in inline R code: you can do a lot of processing ahead of time, and then you only have to say "the value is `r ans$value`, and all the things you need are in one place. (I forget where I saw this and I seem not to be awake enough to find it today.)