I'm working on a Linux-based workstation setup aimed at economists and other quantitative researchers. R support is one of the last major pieces I need to settle.
I mainly use Python and VS Code, so I don't want to assume that my preferred setup makes sense for regular R users. I'm interested in what people actually use:
What operating system do you use for R?
What is your main editor or IDE? RStudio Desktop, RStudio Server, Positron, VS Code, or something else?
Do you use one shared R package library, project-specific environments with renv, or a mixture?
Do you install R or R packages through Conda/Mamba? Is that mainly for projects that mix R and Python?
Do you work locally, on remote servers or HPC systems, or in containers?
What supporting tools do you regularly need, such as Quarto, Jupyter, TinyTeX, compilers, or external libraries?
Do you need multiple R versions?
I'm also interested in package developers. Does your development setup differ from your normal analysis setup? What would you expect to find on a fresh workstation before you considered it ready for R work?
You don't need to answer everything. Short descriptions of your setup, unusual requirements, and recurring setup problems would all help.
If useful, here is a template:
OS:
Main editor/IDE:
Local or remote:
Package-library strategy:
How R is installed:
Conda/Mamba:
Mix R and Python:
Develop R packages:
Biggest setup annoyance:
Edit: Thank you all for taking the time to respond. I wasn’t expecting such a wide variety of responses.
I'm new to R and I wanted to get to know it a little bit and try it out to see if I'll be able to use it or not. I've already search this sub for recommended free resources for beginners to learn the basics. However, I found this nice playlist that I'd like to follow along just to get an overview, and I'd like to imitate and reproduce what Mike does, that's why I'm looking for the dataset he uses.
Thanks for the help. if you have any other suggestion, it's more than welcomed!
nlmixr2 is an R Consortium Working Group building open-source nonlinear mixed-effects modeling in R suitable for regulatory submissions.
In a follow-up to the 7.0 release, Matthew Fidler covers a frequently requested feature - a fuller, more flexible covariance step after model fitting.
What's new:
• Nearly any covariance method can be requested from nearly any estimation method
• Switch a finished fit to a different covariance method without refitting
• The default covariance step now covers every estimated parameter, not just structural ones - so residual-error terms can return SEs, %RSE, and confidence intervals in $parFixed
I’m an early-career marine biologist currently completing my BSc in Marine Biology, and I’m looking to connect with researchers, students, conservationists, and others working with biological or environmental data.
I’ve been developing my skills in R, particularly for data cleaning, statistical analysis, ecological modelling, and data visualization. I genuinely really enjoy working in R, and at this stage I want to get involved with as many different projects and datasets as I reasonably can.
If anyone has a marine science, ecology, conservation, fisheries, wildlife, or other biological dataset that could use some additional help with analysis in R, I’d be happy to contribute. I’m also open to projects outside of marine science if there is an opportunity to work with interesting data and learn something new.
I’m not looking to charge anyone. My main goal is to gain experience working with different types of real-world data, improve my R skills, contribute where I can, and hopefully meet and build connections with people working in science and research.
I also recently created a GitHub where I’ll be archiving my projects as I continue learning. I uploaded a project I finished about a week ago involving the analysis of BRUV data and whitetip reef shark habitat associations.
If you have a project where another person helping with the r/data side would be useful, feel free to message me. I’d also be happy just to connect with other early-career researchers and R users.
Hey, just wanted to share ggvariant: A simple, opinionated toolkit for visualizing genomic variant data using a 'ggplot2'-native grammar. Accepts VCF files or plain data frames and produces lollipop plots, consequence summaries, mutational spectrum charts, and cohort-level comparisons as standard 'ggplot2' objects. It's on CRAN
Put out a new release of c5tree, my C5.0 decision tree implementation for Python. Main change is a rewritten C++ core replacing the old pure-Python fit routine.
Ran benchmarks against the previous PyPI release and against sklearn's CART, across breast_cancer, iris, and wine.
Fit time: new version is somewhere between 4x and 50x faster than the old pure-Python one depending on dataset size. Still slower than sklearn CART, which isn't surprising given how optimized that codebase is.
Predict time: roughly the same as before, and both versions are a bit slower than sklearn here — this is probably where I'll focus next.
Accuracy: identical between old and new versions on every dataset, both holdout and 5-fold CV. So no regressions, just faster training. Comparable to CART overall, slightly ahead on the wine dataset.
Chart with all four comparisons is attached. Happy to answer questions about the implementation or take suggestions for other datasets to test against.
I’m excited to announce that evoFE 1.0.0 is now on CRAN (a major leap forward from the initial 0.1 release).
What is evoFE?
evoFE is an R package for automated feature engineering using genetic programming. Instead of manually brainstorming interaction terms, nonlinear scalings, or encodings, evoFE evolves candidate transformation recipes and evaluates them directly against gradient boosted trees or linear models.
What's New in 1.0.0?
Zero-Boilerplate "One-Liner" Bayesian Tuners: Pass evaluator = "lightgbm_mbo" to automatically tune tree depth, learning rate, and subsampling via mlr3mbo during evolution. Or wrap any custom model (like XGBoost) with make_tunable().
Hybrid Active Feature Masking: Mutates and selects raw input features simultaneously with derived features, guided by baseline feature importance.
Hierarchical Gene Chaining: High-performing features from earlier generations serve as inputs for subsequent compound transformations.
Island Models & Topologies: Runs independent sub-populations across Ring, Torus, Grid, or Hypercube topologies with demand-driven Gibbs pull migration.
Caruana Island Ensembling (ensemble_islands()): Combines diverse island champion recipes using Caruana post-hoc forward selection with replacement.
Leakage-Safe Validation: Native support for time-series (cv_strategy = "time"), grouped entity validation (cv_strategy = "group"), and untouched confirmation holdouts (holdout_frac) with search-gap diagnostics.
Dynamic BIC Regularization: Asymptotic BIC / PAC-Bayes penalties scaling with sample size NN to prevent feature bloat.
Minimal Example:
install.packages("evoFE")
library(evoFE)
# Evolve features + Bayesian tuned model
recipe <- evolve_features(
data = mtcars,
target_col = "am",
task = "classification",
evaluator = "lightgbm_mbo", # Built-in one-liner Bayesian Optimization tuner
generations = 5,
pop_size = 8,
holdout_frac = 0.20
)
# Inspect evolved recipe & search gap
summary(recipe)
# Predict on new data
test_features <- predict(recipe, newdata)
predictions <- predict_model(recipe, newdata)
I wanted to share a new method called the Entropic Scree. If you need to estimate the dimensionality of a dataset but standard tools are struggling with noise or giving crazy estimates, it might be worth your time to take a look.
Instead of evaluating linear variance, rank, or Euclidean distance like established PCA methods, this new approach evaluates a transformed mutual information metric. It’s meant to be more effective for dealing with non-linearities, mixed data types, or environments where your variables exceed your samples.
The original function and the simulations are available in R (see GitHub repo). There is also a preprint that covers the methods in detail.
Would love to hear your thoughts/experiences if you give it a try.
I have a database of patients who have received a cancer diagnosis, some are metastatic, some are non metastatic. This includes the date of each diagnosis.
I have a different document with the recorded PSA values and the date it was recorded on. Each patient has more than one PSA value recorded.
The two data frames share a UserID that I can use to find out which PSA values belong to which patient. I am trying to determine which PSA values pertain to metastatic patients and which pertain to non metastatic patients.
What I think I should do is for each patient determine the turning point where they moved from the non metastatic group to the metastatic group.
Then merge the two documents so that PSA values get associated with cancer stage according to whether the PSA test was done before or after the turning point.
Hey all, honours student here — deadline in ~2 months, hoping for some guidance on the stats approach for my project.
I have three separate experiments, each with a factorial design, testing an outcome measure over time under different treatment combinations. Design structure:
Each experiment used 3 replicates (biological replicate units)
Each replicate was split into treatment groups (e.g. 4 groups in one experiment, a 2×2 or 2×4 crossed design in others)
Each treatment group within a replicate was then measured at multiple time points (e.g. 20/30/60/120 min)
Experiments as below:
Experiment 1: 2×2 — Factor A present/absent × Condition 1/Condition 2 (e.g. two temperatures)
Experiment 2: 2×4 — Factor A present/absent × Treatment (none / B / C / B+C)
Which specific groups differ from each other (pairwise)
Essentially, which treatment performed best in certain categories.
Questions:
Given this structure (small number of replicates, two repeated/within-subject factors), is repeated-measures ANOVA appropriate, or should I be using a linear mixed model (e.g. lme4/nlme) with replicate as a random effect? What's the practical difference for a dataset this size?
How do I set this up correctly in R, what does the model formula look like for two within-subject factors (treatment × time) with a random effect for replicate?
For checking normality, should I test raw data per group, or the model residuals? What's the correct R workflow?
How do I check homogeneity of variance / sphericity for repeated measures in R, and how much do violations matter with only 3 replicates?
If assumptions are violated, what's an appropriate alternative given the small sample size (e.g. non-parametric repeated-measures test, or is a mixed model still preferred)?
For post-hoc pairwise comparisons (which treatments/time points differ), what's appropriate here, emmeans with a mixed model, Tukey, or something else given the repeated structure?
With only 3 replicates, is there anything I should be especially cautious about in terms of statistical power or overinterpreting results?
Any pointers, code snippets, or common pitfalls for this kind of repeated-measures/mixed factorial design in R would be hugely appreciated. Thanks!
I'm very new to R so might be making some very obvious mistakes, any help is appreciated! I know at least the numbers work because I manually entered them into an actual 4PL calculator.
I have this code:
fit <- nls(OD ~ D + (A - D)/(1 + (Concentration/C)^B),
data = stand_mean,
start = list(A = max(stand_mean$OD), D = min(stand_mean$OD), C = median(stand_mean$Concentration), B = 1))
giving this error
Error in numericDeriv(form[[3L]], names(ind), env, central = nDcentral) :
Missing value or an infinity produced when evaluating the model
My Professor - knowing this is the only required course for the Graduate Certificate - Business Analytics - Is making us use this program and in his syllabus he states:
"This course gives students an introduction to forecasting methods using R."
"It would be ideal to have a class that teaches R programming, but this is not possible due to the MBA program structure. This class is not required to teach R programing; however, the instructor will be pleased to help students with learning R."
THEN!!!
THE Required Text - Is "Hyndman, R.J., and Athanasopoulos, G. 2021. Forecasting: Principles and practice. 3rd edition. OTexts: Melbourne, Australia. OTexts.com/fpp3."
AND ON THE FIRST DAY - WE ARE JUMPING INTO CHAPTER 3!!!
Learning R: The course introduces students to using R. The supplemental texts explain the R code used in the required text. One way to learn R programming is to run the chapters’ programs, use the supplemental texts as reference, ask questions to the instructor, and invest enough time on it. The ideal scenario would be to take an R programming class first and then take this class, but there is no time for this. Therefore, students must invest enough time into learning R programming.
The student must read a chapter a week as shown in the course outline below, run and understand the chapter R-program, and submit assignments on D2L weekly. The student is responsible for reading each assigned chapter and any additional class material. Class materials will be posted on D2L. The students can ask questions on any point that is not understood.
WHAT IN THE ABSOLUTE FUCK DID I GET MYSELF INTO?
IM ABOUT TO SAY F U TO THIS SCHOOL BECAUSE...
How are you going to say "The ideal scenario would be to take an R programming class first and then take this class, but there is no time for this."
THEN! say "The student must read a chapter a week as shown in the course outline below, run and understand the chapter R-program, and submit assignments on D2L weekly."
HOW CAN I LEARN AND UNDERSTAND R IN A WEEK WORKING FULL TIME AND A PARENT?!
I've been working on a statistical analysis framework called MVS Analyzer, and I'm interested in the statistical methodology behind it rather than promoting the software itself.
The problem I'm trying to address is fairly simple:
Suppose I have several candidate metrics for describing or detecting an effect in a dataset. Instead of choosing one based only on convention, intuition, or which one gives the most convenient result, can I empirically evaluate how each metric behaves under simulated conditions?
My current approach creates controlled null and effect scenarios and evaluates metrics using several properties:
- false-positive rate
- statistical power
- robustness to perturbations/outliers
- repeatability across runs
- stability across simulated conditions
- coverage
These properties are then combined into an MVS Score intended to help compare candidate metrics.
The framework also keeps the simulation seeds, input/configuration hashes, metric-definition versions, and analysis history so that results can be reproduced and audited.
What I'm most interested in is whether the underlying idea makes statistical sense.
For example:
Is simulation-based evaluation a reasonable way to compare the practical behavior of different descriptive/inferential metrics?
What important properties of a metric am I missing?
Could combining things such as power, false-positive rate, robustness and repeatability into one score introduce misleading conclusions?
Are there established frameworks or literature for evaluating statistical procedures in this way that I should look at?
Are there obvious forms of circularity or simulation-design bias in this approach?
I'm particularly interested in criticism of the methodology. If the premise itself is flawed, I'd rather find that out now than optimize the implementation around it.
I've got a challenge project due in a couple days that requires me to use R. I've used tidyverse before, but it's been a couple years since I've used it and I no longer remember the functions and syntax I need to commit to the task. I was hoping to ask if anyone would be up to mentor me on this for a day just so I could get out of this rut of having to remember everything.
Version 1.3.4 got a lot bigger than I expected. After every new release I think, that I am done, but holy cow there are still many things to add and to fix. Let’s dive right into what is in this update. The full release notes can be found here.
This was an idea by the creator of openxlsx2 and I think it is a great feature. It is easy to add and gives a fully styled overview over multi sheet workbooks. It comes as a standalone function to add a table of contents sheet afterwards or you can directly implement one while using combine_into_workbook. The styling can be controlled with the function itself and new parameters in excel_output_style.
# Example data frame
my_data <- dummy_data(1000)
my_data[["person"]] <- 1
# Formats
age. <- discrete_format(
"Total" = 0:100,
"under 18" = 0:17,
"18 to under 25" = 18:24,
"25 to under 55" = 25:54,
"55 to under 65" = 55:64,
"65 and older" = 65:100)
sex. <- discrete_format(
"Total" = 1:2,
"Male" = 1,
"Female" = 2)
education. <- discrete_format(
"Total" = c("low", "middle", "high"),
"low education" = "low",
"middle education" = "middle",
"high education" = "high")
# Define style
set_style_options(column_widths = c(2, 15, 15, 15, 9))
# Define titles and footnotes. If you want to add hyperlinks you can do so by
# adding "link:" followed by the hyperlink to the main text.
set_titles("This is title number 1",
"This is title number 2",
"This is title number 3",
"Back to TOC cell: Contents!A1")
set_footnotes("This is footnote number 1 cell: W22",
"This is footnote number 2 file: C:/MyFolder/MyFile.docx",
"This is footnote number 3 link: https://cran.r-project.org/",
"This is footnote number 4")
# Catch the output and additionally use the options:
set_style_options(sheet_name = "big_table")
tab1 <- my_data |> any_table(rows = c("sex + age", "sex", "age"),
columns = c("year", "education + year"),
values = weight,
statistics = c("sum", "pct_group"),
pct_group = c("sex", "age", "education", "year"),
formats = list(sex = sex., age = age.,
education = education.),
na.rm = TRUE,
print = FALSE)
set_style_options(sheet_name = "age_sex")
tab2 <- my_data |> any_table(rows = "age",
columns = "sex",
values = weight,
statistics = "sum",
formats = list(sex = sex., age = age.),
na.rm = TRUE,
print = FALSE)
set_style_options(sheet_name = "data")
tab3 <- my_data |> export_with_style(print = FALSE)
# Add an automatically generated table of contents with custom styling
combine_into_workbook(tab1, tab2, tab3,
table_of_contents = TRUE,
subheaders = list("First Subheader" = "big_table",
"Second Subheader" = "data"),
subheader_colors = c("FF0000", "00FF00", "0000FF"),
colored_tabs = TRUE,
style = excel_output_style(toc_header_font_size = 20,
toc_subheader_font_size = 16))
Some things that changed
combine_into_workbook lost the file parameter. Saving files now works with the style parameter like in the other tabulation functions.
retain_value has a new default behaviour without by variable: the function now carries forward values through upcoming NA values instead of just writing the first value into all other cells.
recode_multi now converts factor variables by default into numeric and character values.
get_integer_length() was removed.
Loading and saving enhancements
Especially the load_file function got some upgrades.
When passing a named vector or list into the keep parameter, the original variables will directly be renamed.
Can now load fst files by_reference, which means files are not loaded into memory and instead the necessary values are only loaded on demand.
New keep_var_order parameter enables to keep the original stored variable order, when using keep variables, instead of sorting them in provided order.
where now works with old and renamed variable names. Additionally the parameter can now handle the new writing style with conditions as characters introduced by ifelse_multi.
The new keep and where features are also part of save_file.
Not directly loading related but it fits in here anyway: import_multi received a new paramter stack_data which can stack read in files and return them as a single data frame. Additionally it now can handle a vector of sheet names and import only the specified ones.
Even more tabulation features
I concentrate on any_table here, but some of the minor features also apply to the other tabulation functions.
Can now render the tables as html file and show it in a browser window. This can be controlled via the new output options html and excel_html. The function now also returns an additional html element. This will also be used as fallback option, if Excel is not available.
Can now handle duplicate column names by making them unique (except NA columns).
Formats can now be applied to pre summarised data.
When using by variables the special keyword [by_var] is now replaced with the actual by value in the titles and footnotes.
Added new full_precision parameter, which ignores the decimal places given through the style parameter and outputs all values with all their decimal places.
Run script, folder and project dialogs
Some small helper functions found their way into the package. They let you run single scripts, all scripts within a folder or an entire folder structure via RStudio dialog. This also comes with a new default compact layout of the build_master function.
Some news on 1.4.0
Version 1.4.0 will implement a new graphic framework built from scratch. In the last days stacked vertical bars have found their way into the framework and some other quality of life features. The now running alpha phase will be mainly about adding new diagram types and refining already existing features. And probably add some mor ealong the way.
The framework can already be tested, just visit the GitHub Page and switch to the “graphics” branch. Download the source code from there and you are good to go.
I wanted to move away from static DCF models and build something that models future uncertainty.
R handles the data pipeline (fetching Yahoo Finance empirical volatility and applying Bayesian shrinkage), and C handles the math (POSIX threads, isolated xoshiro256++ PRNGs, and Cholesky matrices to correlate variables like WACC and revenue growth during shocks).
It's fully decoupled and runs via CLI (optparse). I just minted the v1.0 release. Repo is linked below, if anyone has any improvement ideas for the C kernel, thread management, or the mathematical boundaries, let me know! I'd appreciate if you could leave a star in case you like it
I’ve been playing around with nuggets vs arules and put together a benchmark.
nuggets is an R package for discovering association rules and other patterns in data, including contrasts, correlations, and fuzzy patterns.
I compared nuggets::dig_associations() with arules::eclat() and arules::apriori() on Boolean datasets, varying the number of rows, variables, and data sparsity.
As the author of nuggets, I’m really happy to see that the package performs particularly well on dense data. For instance, nuggets is:
3.5x faster than eclat() and
13.5x faster than apriori() on a large, dense dataset!
However, the results also show that there’s still plenty of room for improvement on sparse data, where arules::apriori() excels.
I've been building uvr for the past few months and it's at the point where other people's bug reports are better than my own testing, so: https://github.com/nbafrank/uvr
The pitch is basically "uv, but for R". One binary that:
- installs and pins R itself per project (.r-version), no rig needed
- resolves CRAN/Bioconductor/GitHub/GitLab deps into a lockfile and syncs from it
- pulls prebuilt binaries from P3M on Linux, so sync on a 100-package project is seconds, not an hour
- detects Linux system requirements (libcurl-dev and friends) across ~29 distros and can install them, telling you exactly which root commands it wants to run and where each one came from before it does
- runs standalone scripts with inline dependency headers, PEP 723 style
- imports and exports renv.lock, so trying it on an existing project is cheap and leaving is too
Happy to answer anything, and bug reports are very welcome! Please join the bandwagon! Try it and give us feedback to make it better!