
Rsuite – R development and data science platform - wjak
https://github.com/WLOGSolutions/RSuite
======
amirmasoudabdol
I’m using R for a while in my current position, alongside some other
programming languages, Python and C++. R is bar far the hardest to predict and
read. Rstudio is terrible. It’s a wrapper around a “web app” and that simply
doesn’t work well for something as complicated as IDE. To give an example,
Rstudio does only one thing at the time, you are running a code, you cannot
open a data frame even to look at it. Rstudio doesn’t at all behave likes any
other IDE that you’ve seen either. Try to increase the font size and the whole
idea scales up!

R by itself is a mess, and I don’t think I have to say much about that. R
community is big and that’s good and bad. It’s good because amazing people are
developing amazing packages for it. It’s bad because there is a lot of bad
packages. It’s a lot like JavaScript community. I have a feeling the community
has started to reward “having a package”, and everyone has a package.

Besides the quality of R packages and R being a strange programming language,
R gets the job done. However, if your job is anything beyond some statistics
and data processing, then good luck. I’m not saying that you cannot achieve
what you want to achieve using R, however, good luck reading R code. I found
it extremely hard to read R codes and so far 90% of codes that I’ve
encountered have little to no comments.

~~~
epistasis
> R being a strange programming language

I'm probably an outlier, but I have to say that the language itself is one of
my favorite things about R.

Vector based, super powerful indexing of vectors, functional programming
basics, lazy parameter evaluation, super convenient parameter matching and
defaults, all these things make it super productive for me and let me deal
with data far better than other languages. Matlab is similar in its ability to
deal with data, but that's a language that feels far clunkier to me. Python
has caught up with some of its packages, but it definitely feels bolted on
instead of native to the language.

~~~
iamcreasy
R language has many quirks. Here was an effort to list them:
[https://www.burns-stat.com/pages/Tutor/R_inferno.pdf](https://www.burns-
stat.com/pages/Tutor/R_inferno.pdf)

Also, the author of R language said the performance of R is sub-optimal. In
his own words:
[https://www.stat.auckland.ac.nz/~ihaka/downloads/JSM-2010.pd...](https://www.stat.auckland.ac.nz/~ihaka/downloads/JSM-2010.pdf)

Currently I am using PyCharm with R plugin that JetBrains released very
recently. R Studio is very slow and buggy.

~~~
epistasis
That’s a very colorful document, reminiscent of the excellent Unix Haters
Handbook, but the first chapter is standard floating point stuff, common to
every language. It doesn’t inspire confidence that the writer bothered to
learn anything about the domain before deciding to write and complain.

Chapters two and three are the lesson to not use procedural language
fundamentals if you want performance, and to instead use functional
equivalents. Not exactly a language quirk.

If somebody has only ever used 2000s-era Java and C# and those types of
languages, functional style programming will be a strange beast. But python
has enough functional style things such as lost comprehensions, and I hear
Java and C++ have gained functional style programming too, so in this day and
age I’m not sure that functional style programming should be considered
quirky.

The runtime performance is all due to the current implementation, not the
language itself. I think JavaScript has far more quirks, it then it was also
invented in an insanely short amount of time so that’s not too surprising.

------
laichzeit0
How do you guys get R predictive models into production? Last I used Plumber
to put a REST API in front of it then discovered R is a single threaded
runtime so effectively you can only go 1 request at a time. I guess the only
option is to containerize and run many instances with a load balancer in
front? I develop on a Mac so I can’t go the Microsoft R server route and I
don’t want to embed myself into some commercial solution, e.g. Rsuite. You can
trivially do this with the Python ecosystem.

My feeling is that R is great for anything that doesn’t need to be
operationalized into production (monitoring, security, logging, scaling,
performance, etc). There are so many good ML/stats libraries in R and most
books seem to use R (when written by academics) but it feels like these people
have never had to put anything into production.

~~~
CapmCrackaWaka
It depends on what you mean by 'production'. I've had great success setting up
my data collection, engineering and predictions in batch processes. I agree
though, I would never try to use R with a REST API, but I don't think it was
ever designed for that.

As a general rule of thumb, if something needs real time predictions or I need
deep learning libraries, I use Python. R is for anything else.

~~~
wjak
Exactly, production and deployment process are very different. In enterprise
it is very rigid with production that has no internet connection and the best
if you do not install pkgs there (supported by rsuite). But I had a customer
who treated dev as prod. :)

------
glofish
R, unfortunately, is also one of the most ill-designed yet popular programming
languages in existence. I would strongly recommend people to steer away from
it. If you cherish your sanity stay away from using R!

Moreover after seeing what my colleagues publish as scientific R programs, I
came to believe that science itself is bottlenecked by the large scale
adoption by R and the sloppy, inconsitent and bug-infested programming
practice that it encourages.

R does a few things well - cross-platform, plotting works on all platforms,
packaging works well. But for actually programming it is atrocious.

~~~
Mikeb85
R is a scripting language, most of the underlying infrastructure is written in
Fortran, C and C++. R is also designed for stats, not writing software. Of
course you're going to have a hard time if you treat it like a real
programming language. That's why R provides easy interop with other languages.

But R also makes a lot of the tasks you do in data science far easier than it
would be in a 'real language'.

~~~
sargram01
I find I spend most of my time debugging R, which is astoundingly difficult
since it doesn’t report line numbers on errors. Most of my code is in C++, so
that helps, albeit it’s still overly complicated to start up R in gdb.
Amazingly Julia isn’t much better when it comes to error reporting either.

~~~
Zelazny7

      options(error=recover)

~~~
LegitShady
All the design brief said was get started anything beyond that is a change
request

------
syrahshiraz
Disclosure: I work at RStudio

Took a quick look at the docs. If you're looking for dependency management
there's renv[1] and you can (obviously) use git for source control. If you
actually have enterprise use cases for library curation or air-gapped
deployments, you can check out RStudio Package Manager[2]. Among other things,
it provides precompiled binaries for packages, which Rsuite doesn't improve
on, per docs[3]:

> Now you are ready to install dependencies. __Beware __that it will take a
> lot of time because of compilation. You install dependencies with the
> following command:

[1]: [https://github.com/rstudio/renv](https://github.com/rstudio/renv)

[2]: [https://rstudio.com/products/package-
manager/](https://rstudio.com/products/package-manager/)

[3]:
[https://rsuite.io/RSuite_Tutorial.php?article=rsuite_binary_...](https://rsuite.io/RSuite_Tutorial.php?article=rsuite_binary_linux_packages.md#install-
dependencies-long)

~~~
wjak
Rsuite has supported binary pkgs about a year before rstudio. You have not
read docs to the end. Rsuite has been used for enterprise. It works great. And
it is open-source. Moreover it brings proper definition of R project which
rstudio still is missing.

------
psv1
After a couple of minutes on their website I still can't figure out what
advantage this offers over using RStudio as an IDE and/or running scripts with
the default CRAN R installation.

~~~
wjak
Hi, I one of the creators. From GitHub page: R Suite an R package which
together with R Suite CLI tool enables you to design deployment workflow that
fits you and makes R your primary data science platform. It has beed developed
by WLOG Solutions company to make their development and deployment data
science process robust.

R Suite gives answers to the following challenges for any R based software and
data science solution:

\- Isolated and reproducible projects with controlled dependencies and
configuration.

\- Separation of business, infrastructural and domain logic.

\- Package based solution development.

\- Management of custom CRAN-alike repositories.

\- Automation of deployment package preparation.

\- Flawless integration with Docker.

\- Development process integrated with version control system (currently git
and svn).

\- Working in internetless environments.

~~~
psv1
My job is pretty much only writing R code and managing R models running in
production. I still don't understand what your product offers that I don't
already have, or how it achieves what it claims to achieve. Copying and
pasting the sales pitch from your website didn't clear things up for me.

~~~
wjak
To make this discussion better you should tell more about your development and
deployment process. This includes definition of the project you use.

~~~
scottlocklin
If you really solved:

>isolated and reproducible projects with controlled dependencies and
configuration.

... that would be huge. Sticking it in docker containers is also a decent
idea.

Thanks for writing it, and pay no mind to ding dongs on here who can't be
bothered to learn the language and its tooling, but sure do have an opinion on
the topic.

~~~
wjak
Check for yourself if our solution works for you. We use it on a daily basis.
But reproducibility is not the only thing. The most important was to have a
project for R.

------
arminiusreturns
I see a lot of people hating on R or on R-studio. For those people, I'm
curious what you would posit as an alternative?

I have liked R because I use it simply, inside emacs org-mode code source
blocks which use either R to generate plots or gnuplot. Based on comments, now
I am afraid I will reach some ceiling in R. What else is there? Octave? Sage?
Julia?

~~~
malshe
If you read the comments, it’s just one guy giving his opinion on every
comment without any supporting evidence.

------
anthony_doan
I'm going to buck the trend and state that I love using R for modeling and
statistic.

The R packages for these domains are one of the best I've seen.

As for R in production, I would wrap it using
[https://www.rplumber.io/](https://www.rplumber.io/).

------
vhhn
Hi Wit, you guys do a great job to make R ready for deployment in production.

What do you think of the new renv package?

~~~
wjak
It's goal is different.

We started with reproducible project definition. Then we implemented rsuite to
help manage the project. It includes dependency management which is what renv
solve. What is the biggest difference is that our project consists of possibly
many pkgs that are local to it. This allows you to create complex solutions.
Moreover deployment PKG is zip file and to use it you only need r. No PKG
installation on prod.

------
xvilka
There was a request to add R in GitHub Semantic library and tool, but
prerequisite of that work is creating [1] a tree-sitter [2] parser. So if
anyone is willing to help - welcome.

[1]
[https://github.com/github/semantic/issues/382#issuecomment-5...](https://github.com/github/semantic/issues/382#issuecomment-555122109)

[2] [http://tree-sitter.github.io/tree-sitter/](http://tree-
sitter.github.io/tree-sitter/)

------
ngcc_hk
I heard of R when I am fond of XLispStat. The older language is good but it is
lisp. Hence, people move on to the mess. I just use R on a pragmatic manner.
It is very hard if you take the language too serious. Just use it. And if you
can compare a bit your result with other like old SPSS you are familiar with
as the result is quite programmer dependent.

