React for R
github.com
github.com
That being said, if you're investing time to learn React and dealing with all its pitfalls to use with R, you might as well just go all in with React at that point.
The team that did the analysis apparently did a great job, so additional requirements were thrown their way: a frontend and an interactive planning module on designing the pipe networks on micro level (smallest unit was a single house)
A year later the absolute maniacs delivered the application. They only knew R and some html/js, so that's what they used.
Cursed as fuck of course, and because they were external they left short after. This was pretty bad for the people left holding the bag; I mostly found it awe inspiring in the "doom running on an electric toothbrush" kinda sense.
I have a similar anecdote: I was brought in on a project where a group of terrorists implemented a solution for a TSP-like problem directly in R. We eventually replaced that thing with OR-Tools.
Why would you say that?
I would never write a full stack application in R. Terrible maintainability.
Glad to hear the agreement. Little small projects are so fun. Stadium-sized pools full of spaghetti less so!
Statistical Rethinking by McElreath is really what finally got me to see the value of R.
You can find the python versions of the class and they are certainly not better.
A full application in R really makes absolutely no sense.
You're 100% right that R is great for data scientists (my background) for frontier level academic implementations as well as toy/simple models. It's generally a poor runtime for computation and suffers from much of the same issues as Python for data quality and typing. Python is better for battle-hardened type stuff, has better debugging tools for certain.
R _can_ be done well, but the juice isn't worth the squeeze typically.
Considerations like repeatable procedures, reliable package heirarchies, etc. were clearly and more or less politely Not Interesting. I spent several years with one of my tasks being an attempt to get the R package universe into Gentoo, and later to RPM packages.
I wouldn't say the R devel community was rude about it, but the systems-administration view of how to maintain the language was just not on their radar.
At the time I was trying to provide a reliable taxonomy of packages to a set of research machines at a good sized university. Eventually, I gave up on any solution that involved system package managers, or repeatability. :)
So if you're a researcher driving your own train, R is freakin' FANTASTIC. If you're the SA attempting to let that researchers' department neighbors do the same thing on their workstations, anticipate fun.
Another: R can’t losslessly represent JSON because 1 and [1] are identical. That’s a float (well, float vector) literal by the way, the corresponding int literal is 1L, though ints are very prone to being silently converted to float anyway.
I keep wondering if I should learn the Python data science ecosystem at some point but it just seems like a waste of time. One of my personal projects is written in Python but calls into R for statistics/plotting.
The language itself however, incredibly cursed.
I think of MATLAB, Mathematica, R, and Python together as "practitioner's languages". These are languages that are designed from the core to be highly productive to a specific kind of technical worker (in the sense of developer velocity).
MATLAB for engineering. Mathematica for mathematics. R for statistics. Python for software engineering.
You could also say "Python for ML", of course, and that would be true, but Python is also used for general purpose programming much more than the other three. I think that "Python for software engineering" is more correct.
I think that each of the languages is shaped to the way that its users think about the problems that they want to solve with it.
MATLAB is shaped around linear algebra. Mathematica is a term-rewriting system. R has lots of magic around data and scopes to make the surface syntax for stats nice. Python is shaped like a traditional OOP language but with a pseudocode-like syntax and hooks so that libraries can act magically.
This is kinda half-baked, I'm trying to express this for the first time. But essentially I think that Python is what you get when you have real programmers (^TM) try to create the programming equivalent of something like MATLAB, Mathematica, and R.
And so of course ML, which is a field dominated by real programmers, adopted Python in order to create their ecosystem.
> I think that Python is what you get when you have real programmers (^TM) try to create the programming equivalent of something like MATLAB, Mathematica, and R.
I think this is a better description of Julia tbh, at least relative to MATLAB.
On the flip side, R developers with strong software development skills can be incredibly valuable in academic settings.
The problem is how to increase the efficiency with which back-end developments (by technical people) get rolled-out to the end-user base. There are countless ways to do this of-course. The more technical resources one has available (e.g. knowledge of different stacks etc.), the more options. But when resources are scarce one is tempted to look for the (possibly only perceived) efficiency of a "full stack" approach.
[1] a loose term which nevertheless reflects something very real: the widespread use of data in society for all sorts of purposes
In the end, to have a nice webapp, we ended up rewriting the R code into typescript. Julia don´t solve this also, as you have a hard time to set it up to communicate with other things. It seems that we can´t avoid the "2 or 3 languages" problem if you don´t use python.
I think the core issue is that the coordination benefits of having everyone use Python are overestimated, and the benefit of better statistical tools in R and SWE skilling up in statistics is underestimated.
That has not at all been my experience. Loading the tidyverse pulls over 1000 things into your global namespace and clobbers several standard library functions in the process. Never mind that seemingly every single package has its own "filter" function.
When you start getting different results based on the order you import packages it's usually a bad sign.
Use datatable instead.
It seems that reactR provides functions for building react components directly from R that can be used in Shiny apps.
(This package isn't really meant to be used directly by the typical user)