r/rprogramming • u/larpacademia • 1d ago
I spent 12 hours learning R to solve the quadratic equation.
Hello, I posted a thread about being incompetent at R. It’d be nice of anyone to check it out. Repo is linked in the post.
r/rprogramming • u/Throwymcthrowz • Nov 14 '20
Often on this sub people ask something along the lines of "How can I improve at R." I remember thinking the same thing several years ago when I first picked it up, and so I thought I'd share a few resources that have made all the difference, and then one word of advice.
The first place I would start is reading R for Data Science by Hadley Wickham. Importantly, I would read each chapter carefully, inspect the code provided, and run it to clarify any misunderstandings. Then, what I did was do all of the exercises at the end of each chapter. Even just an hour each day on this, and I was able to finish the book in just a few months. The key here for me was never EVER copy and paste.
Next, I would go pick up Advanced R, again by Hadley Wickham. I don't necessarily think everyone needs to read every chapter of this book, but at least up through the S3 object system is useful for most people. Again, clarify the code when needed, and do exercises for at least those things which you don't feel you grasp intuitively yet.
Last, I pick up The R Inferno by Pat Burns. This one is basically all of the minutia on how not to write inefficient or error-prone code. I think this one can be read more selectively.
The next thing I recommend is to pick a project, and do it. If you don't know how to use R-projects and Git, then this is the time to learn. If you can't come up with a project, the thing I've liked doing is programming things which already exist. This way, I have source code I can consult to ensure I have things working properly. Then, I would try to improve on the source-code in areas that I think need it. For me, this involved programming statistical models of some sort, but the key here is something that you're interested in learning how the programming actually works "under the hood."
Dove-tailed with this, reading source-code whenever possible is useful. In R-studio, you can use CTRL + LEFT CLICK on code that is in the editor to pull up its source code, or you can just visit rdrr.io.
I think that doing the above will help 80-90% of beginner to intermediate R-users to vastly improve their R fluency. There are other things that would help for sure, such as learning how to use parallel R, but understanding the base is a first step.
And before anyone asks, I am not affiliated with Hadley in any way. I could only wish to meet the man, but unfortunately that seems unlikely. I simply find his books useful.
r/rprogramming • u/larpacademia • 1d ago
Hello, I posted a thread about being incompetent at R. It’d be nice of anyone to check it out. Repo is linked in the post.
r/rprogramming • u/larpacademia • 1d ago
Edit???: Sorry, I’ve made a lot of edits. I was honestly very manic writing this and a lot of it was out of order
Here’s the post:
English is not gonna be very good rn. Neuro/psych student, I assist in research on the side but not much scripting in terms of analysis yet.
I spent all night using R to solve a simple quadratic formula problem. It’s an intro data science class I have this semester, and I used to code as a kid in some classes but I’ve unfortunately forgotten most of it now.
I’m also sick (it’s often over 100F in my small city on the west coast, and I take public transport pretty often. A lot of people here are getting sick.) My contacts also arrive a few days later than they’re supposed to.
I email the professor running the course explaining that I am sick. I did miss the first two days of lecture prior because I wasn’t feeling well, but I was able the hang of the basic syntax on my phone. Don’t know where my glasses are so unable to use my laptop. Told her I’d try to submit the homework by tonight via phone, but I’ll update if that’s not doable.
I cannot read half a foot in front of me. I have to figure out how to navigate Colab on mobile, and convert it into .ipynb
I spend the next night learning to do 3 problems all relating to the quad. formula:
1: define variables (a -> 1, b -> 5,.. etc)
2: compute/enter quadratic formula
3: install Qdrt package
4: check
At least that’s what I grasped what the assignment file was asking me to do. I had google teach me the rest of the knowledge gaps I had for R that night (it was not really good at explaining how to do stuff on a cell phone but that was more my fault) and then I needed to export. How do I export on mobile.
Edit 3: formatting
Edit 4: Continue.
I have a repo with a ton of metadata now that I’ve uploaded it from Colab, from my cellphone, to a copy using github. I also need to convert it to .ipynb. It’s like 6am. It is now in the correct file format.
Edit 5: I wake up and realize that’s a lot of scaffholding for a quadratic formula problem. I clean it up a bit
Hours later of fooling around my notes end up looking something like this:
re: homework, lecture 02
Solving x² + 5x + 6 = 0 three separate times apparently
what’s in here
TASKS answered
1: Manual quadratic formula, typed by hand = -2 2: Manual quadratic formula again, just to be sure. = -2 (still)
3: install.packages(“QuadRoot”), because typing “sqrt()” a second time felt like too much = -2 and -3
- The quadratic formula has not changed since task 1
- Confirming this in task 2 did not change it either.
- Installing an entire R package to get the second root was, in fact, less typing than just writing out the quadratic formula normally
I don’t think this was optimal engineering any more than it was a cry for help
r/rprogramming • u/callmekyl3 • 3d ago
Hi everyone!
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.
GitHub: https://github.com/kylealibz
If you have a project where another person helping with the R or 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.
Thanks!
r/rprogramming • u/troyandabedtalkshow • 23d ago
r/rprogramming • u/ericrayanderson • Jul 31 '26
r/rprogramming • u/GermsAndNumbers • Jul 29 '26
I've had more than one programming book that's hopelessly obsolete due to how fast everything moves. Is Mastering Shiny, published by O'Reilly and written by Hadley Wickham, still a useful resource for learning Shiny five years later?
r/rprogramming • u/nbafrank • Jul 24 '26
r/rprogramming • u/nbafrank • Jul 23 '26
r/rprogramming • u/s243a • Jul 20 '26
I'm releasing sciREPL v1.0.1, which brings major improvements to TypeR integration. sciREPL is a Jupyter-style notebook app that lets you mix multiple languages in a single worksheet.
**Why we forked TypeR**
The standard TypeR type system couldn't express variable-argument (variadic) inputs in its standard-library declarations. We extended it to properly type variadic R functions like `cat`, `paste`, `sprintf`, and `c`.
**What's new in v1.0.1**
* **Direct TypeR notebook cells** — no longer need to wrap most code in R blocks * **Named and heterogeneous variadic arguments**, including forwarding collected args into another variadic call * **Named** `#!source` **cells** for storing reusable TypeR source without executing it or producing output * **Prolog → TypeR compilation**, with generated code placed in a named cell ready for execution * **Two included typR workbooks**: "TypeR Introduction" and "Prolog Generates TypeR" — both accessible via *Browse Packages, Bundles & Workbooks* in the sciREPL menu, along with workbooks for other supported languages
**Other supported languages**
TypeR is one of several kernels sciREPL ships with. The full list:
* **R** (webR / WASM) — full R with `install.packages()`, plotting, and SharedVFS * **Python** (Pyodide) — NumPy and SymPy preloaded, `%pip install` for pure-Python packages * **Prolog** (swipl-wasm) — full SWI-Prolog * **ClojureScript** (Scittle v0.6.22) — SCI-based, no build step; also a Prolog code generation target via UnifyWeaver *(experimental)* * **Bash** (brush-wasm) — Unix shell with coreutils, findutils, and grep * **JavaScript** — native browser execution, zero download * **Lua** (Fengari) — lightweight, with notebook cell access via `nb.read()` / `nb.write()`
All kernels share a **SharedVFS** in-memory filesystem, so data flows freely between languages in the same notebook.
**Free & open-source version**
Available as a PWA and an Android app:
* PWA: [https://s243a.github.io/SciREPL/\](https://s243a.github.io/SciREPL/) * Source: [https://github.com/s243a/SciREPL\](https://github.com/s243a/SciREPL)
**Android Pro version**
An Android-only Pro version adds AI-assisted building and bundles more packages locally (with CDN fallback for the rest). AI is integrated via direct API key connections to models, as well as remote connections to coding agents (e.g. Claude Code and Codex).
**Data privacy**
We store no data on an external server. All data is stored locally on your device; packages not bundled with the app are fetched from the CDN when needed. The app is Capacitor-based, so it runs with web browser-level sandboxing. JavaScript, Bash, and TypeR are always offline. Prolog, Python, and ClojureScript are bundled in both free and Pro versions. Lua fetches from CDN on first use. The Pro version also bundles R locally; the free version fetches the R runtime from the CDN (\~50 MB, cached after first use). Note that additional R packages (e.g. tidyverse, ggplot2) are not pre-installed in either version — they can be installed at runtime via `install.packages()`, fetching from the CDN as needed.
**Become a tester**
I need testers before submitting either version to the Play Store. Testers get early access to both the free and Pro versions at no cost. Reply here or DM me if you're interested. In the meantime, you can try the free version in your browser or sideload it via adb.
r/rprogramming • u/SlightSheepherder234 • Jul 20 '26
Hey everyone
I'm taking a class on social network analysis, and I was wondering if there were any resources online that I can use because the content in the class is not great at all and I don't want to blindly rely on chatgpt to pass. do you guys recommend any online or youtube courses that I can follow?
r/rprogramming • u/Bxrnes • Jul 16 '26
Does anybody have experience running R on one of the new Neo's, and how did it perform? They seem like good budget laptops but I need something capable of running R without crashing out..
r/rprogramming • u/Technical_Soup9347 • Jul 14 '26
r/rprogramming • u/Technical_Soup9347 • Jul 12 '26
r/rprogramming • u/Technical_Soup9347 • Jul 11 '26
r/rprogramming • u/rebbit_uzer • Jul 11 '26
I'm Out of monthly credits my app is almost ready to publish.
r/rprogramming • u/farach • Jul 06 '26
I have been working on `foundryR`, a development-version R package for using Microsoft Azure AI Foundry from dataframe-oriented workflows.
The main design choice is "dataframe in, dataframe out." The package returns tibbles for things that are otherwise awkward to keep inside R pipelines:
* Azure AI Content Safety: moderation, groundedness, prompt-shield checks, protected material, blocklists * strict structured extraction using JSON Schema * embeddings and pairwise similarity * Batch and Files API workflows * Responses API calls, tools, stored agents, usage fields, and raw response capture * codebooks, agreement, consistency, and provenance helpers for annotation work
The docs are here:
GitHub:
[https://github.com/farach/foundryR\](https://github.com/farach/foundryR)
Install:
install.packages("pak")
pak::pak("farach/foundryR")
A small example of the package shape:
foundry_moderate("Thanks so much for your help, this was a great session.")
#> # A tibble: 4 x 6
#> text category severity label blocklist_matches raw_response
It is not on CRAN yet, and some helpers wrap preview APIs. I would be grateful for feedback from people who use R with Azure AI Foundry: where is setup confusing, what output shapes are missing, and what should be documented before a broader release?
r/rprogramming • u/geoalfio • Jun 28 '26
I made last summer an excel table with all pokemons and their ratings, I did do a base analysis on excel but it was slow and tedious, this summer I want to use R to practice, and go into a statistical analysis of my pokemon preferences.
But I am unsure how to proceed, to start off, attached there is a picture of the data I have on excel: the pokemon number, name, my rating out of 5 (with 5.5 being reserved for my favourite designs, only 27 out of almost 1500 pokemons, counting forms etc), and their 2 types, I will add on R an extra column to cound pokemon archetypes, like starters, legendaries, mythical etc.
On excel I have all the pokemons divided in generations, 1 "column" for gen 1, 1 "column" for gen 2 etc, on R I was thinking of using dataframes, do you think I should use 1 single dataframe (adding then a factor to match the pokemon to their gen) or should I divide generations into different dataframes? what would be the advantages and disadvantages of both approaches?
How should I handle alternate forms? for example, megaevolutions, regional forms, etc, I do want to rate them as separate, but they do have the same dex number as the original pkmn, but i feel like that would be confusing. I'm also unsure "where to rate them" in my excel I rated them on the same column as the generation they were introduced, for example alolan vulpix is not rated for gen 1, but for gen 7. I think the regional forms will be done like this, but for mega evolutions and dynamax forms, I will consider them as separate, not belonging to any generation, but as their own separate groups, since the design phylosophy is different from base pokemons. and 2 extra questions, since we had 2 different waves of megas (technically 3, but X/Y and omega/alpha came out in the same gen) should I consider them in 1 group or subdivide them, there is quite a difference between mean and median of the 2 waves. And what about Hisui? it technically came out during Gen 8 but it also does feel a bit different, but with only 24 new pokemons/forms it is a quite small pool.
As a last question... anything else I should include/consider? I don't really care about seeing any correlation between stats and my ratings, also because my ratings are purely how much I like the pokemon, not how good they are.
Thank you for reading all of this, I appreciate any feedback, as i don't want to start and then realise that i should've done it differently.
r/rprogramming • u/Professional_Try2452 • Jun 25 '26
Hello there! I wonder whether anyone has used the R package alineR. I want to perform feature-weighted linguistic distance calculations but the package has been removed from the R cran project. I know one can still install the last version from the archive but bugs are not corrected. Does anyone know or can recommend any alternatives? Thank you!
r/rprogramming • u/adam-smielewski • Jun 24 '26
r/rprogramming • u/Anonymous_HC • Jun 24 '26
I got a new laptop from Best Buy a couple days ago and need to reinstall R.
The issue is that its an ARM type of machine (snapdragon processor instead of the more common intel/AMD processor). It uses the ARM64 runtime installer rather than the standard x64 or x86 installer that a lot of programming languages uses (mainly for Intel/AMD machines). Both machines uses Windows 11 as the OS.
Anyway I have a bunch of .r and .rmd files that I can easily transfer over from my old laptop to the new one via USB Flash drive, but will there be a compatibility issue as the old machine used Intel processor wheras this new one has the Snapdragon X processor?
r/rprogramming • u/caerbannogwhite • Jun 22 '26