HN user

vhhn

43 karma
Posts1
Comments27
View on HN
Big Book of R 1 year ago

There are so many options to emded R in any kind of system. Thanks to the C API, there are connectors for any if the traditional language. There is also RServe and plumber for inter-process interaction. Managing dependencies is also super easy.

My employer is using R to crunch numbers enbeded in a large system based on microservices.

The only thing to keep in mind is that most people writing R are not programmers by trade so it is good to have one person on the project who can refactor their code from time to time.

Unlike many other languages, R has a native/built-in tabular data structure. So when your data have tabular structure R is by far the best glue for building pipes between external libreries. If the data fits in RAM it literally doesn't have to leave the data.table object throughout the whole pipeline (including all the cleaning and transformations).

The only meaningful alternative I see is Python with maybe Polars or DuckDB.

We use embedded R in production in a way some other companies would use Python and I can say having a better compiler would definitely help.

Even if most people use R interactively, having contributers working on compiler has many positive spillovers for the language.

Also note that the R code running behind the scenes of your scripts (powering the functions of your favourite packages) is quite a different language, using less dynamic features. This is where a better compiler would always be appreciated.

Atari 800XL Remake 3 years ago

Fun story.

My first computer too. Got it from my uncle without any manuals, we spend a whole afternoon writing down a code of a game from a magazine letter by letter. We thought we will just press the "Start" functional key on the right side. To our surprise, sadly, absolutely nothing happened! After few more hours, my dad came home and it took him few guesses to finally type "RUN" in the console...

Doctests in R 4 years ago

There are still several areas where R beats Python: tabular data crunching, data analysis (plotting, stats), finance (econometrics etc...) but it's less and less obvious.

There are several factors that make healthcare a specific type of product that laissez-faire markets fail to efficiently produce by nature:

* tight connection to insurance

* typical consumer-producer relation relation broken into consumer(patient)-prescriber(doctor)-producer-payer(insurance or government)

* large externalities

These factors led to health care being provided by the public sector in most of the countries.

There are two camps in the R world - tidyverse and base-R (tiniverse).

Its not a coincidence that the author gives an example from the tidyverse ecosystem. Authors and users of tidyverse value other things like consistency and new features over API stability and backward compatility. The base-R ecosystem is actually very stable and so the original package manager is very simple.

With R spreading out from the academic environment and with many new authors breaking their packages' APIs we observe new attempts to solve the issues with dependencies (such as renv or https://rsuite.io)

You don't want to demean your dependent (response) binary variable. So you almost always want to keep beta0 to control for any imbalance in your dependent var.

I was surprised when VSCode snap told me that I should start using different snap to install new versions if VSCode and that my settings would be kept. And it did. So there is some way to respect users settings across snaps at least

GNU Octave 5.1.0 7 years ago

m[x,] is for interactive use

If you write a function and need stable behavior use m[x,, drop = FALSE]. Problem solved.

No need of tideverse (which comes with its own surprises).