Remix.run Logo
ngriffiths 6 days ago

Makes me curious what state R was at the time, or whatever else could've been useful for deep learning, and the benefits of a new language vs adapting something that exists. Seems like it was a big investment

antononcube 6 days ago | parent | next [-]

R and its ecosystem have some unbeatable features, but, generally speaking, the "old", base R is too arcane to be widely useful. Also, being "made by statisticians for statisticians" should be a big warning sign.

nxobject 4 days ago | parent | next [-]

Despite being made by statisticians, I ironically find that munging R packages together for certain classes of analysis such a slog that it prevents me from doing the actual statistical thinking. Sometimes the plots fall behind commercial packages, sometimes the diagnostics, and sometimes you have to combine multiple incompatible packages to get what a commercial package can do.

(Survival analysis and multilevel modeling comes to mind.)

wdkrnls a day ago | parent [-]

This is so far from my experience. For me, R codes do tend to skimp on polish so it takes longer to get to the initial figure, but that is made up for by enabling me to see the data from a much richer perspective (to some extent because I had to think harder about what the output meant) such that I can find all the bugs in the data and in the underlying experimental plan: the stuff which makes it clear all the commercial reports are mostly useless anyway because Garbage in -> Garbage out

wdkrnls a day ago | parent | prev [-]

On the contrary, I find base R less arcane than the current de jour python libraries which copied it

_Wintermute 6 days ago | parent | prev [-]

In my opinion R should thought of as an unbeatable graphical calculator, but an awful programming language.

williamcotton 5 days ago | parent | next [-]

The tinyverse collection of packages makes things a lot more sane, IMO:

  penguins <- read_csv("penguins.csv") |>
    na.omit() |>
    select(species, island, bill_length_mm, body_mass_g) |>
    group_by(species, island) |>
    summarize(
      mean_bill_length = mean(bill_length_mm),
      mean_mass = mean(body_mass_g),
      n = n()
    ) |>
    arrange(species, desc(mean_bill_length))
  
  penguins |>
    ggplot(aes(x = species, y = mean_bill_length, fill = island)) +
    geom_col(position = "dodge") +
    labs(
      title = "Mean Bill Length by Species and Island",
      y = "Mean Bill Length (mm)"
    ) +
    theme_minimal()
_Wintermute 5 days ago | parent [-]

True, but trying to wrap any of that into a function rather than simple scripts makes you delve into the ever-deprecated API for non-standard evaluation.

wdkrnls a day ago | parent | prev | next [-]

You must hate lisp/scheme then too, which has similar semantics as R. In that case books such as SICP would be lost on you.

currymj 5 days ago | parent | prev | next [-]

i would compare base R to basically a shell. meant to be used interactively. okay for small scripts. you can write big programs but it will get weird.

perrygeo 5 days ago | parent | prev [-]

That's how I view it. I still use R for plotting and quick stats analyses but it is painful to do any real work.

I recommend the article "Evaluating the Design of the R Language" [1] - it reads like a horror story. The memory usage and performance is abysmal, the OO features are a mess, and the semantics are very weird ("best effort semantics" is about as predictable as it sounds!). The lexical scoping is based on Scheme but has so many weird edge cases. It's a dumpster fire of a language, but it somehow works for its intended purpose.

[1] http://janvitek.org/pubs/ecoop12.pdf