News for hackers. Stuff that matters.
Re:Rsuite – R development and data science platform by Mikeb85 on Saturday December 14, 2019 @03:17PM (#21791908)
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'.

Re:Rsuite – R development and data science platform by glofish on Saturday December 14, 2019 @03:22PM (#21791938)
that "easy" has a huge price - the language is choke-full of unexpected behaviors, inconsistencies and gotchas - all in the name of making it "easy"
Re:Rsuite – R development and data science platform by ekianjo on Saturday December 14, 2019 @10:42PM (#21794309)
Care to share any language that does things better without a steep learning curve? R is popular for very, very good reasons. You can pick it up and be productive with it in no time, even with the "gotchas"...
Re:Rsuite – R development and data science platform by proverbialbunny on Sunday December 15, 2019 @04:54AM (#21795383)
Raku has less of a learning curve than R, does things better, and is quicker and easier to pick up and be productive in, with barely any gotchas if any at all.

Though, to be fair, I like R. It has good plotting libraries, and as much as it gets bashed I like RStudio too. In comparison, Raku's ecosystem is brand new.

Re:Rsuite – R development and data science platform by epistasis on Saturday December 14, 2019 @10:37PM (#21794289)
R is lisp variant with a ton of syntactic sugar and vectorization of the basic data types. Calling it a scripting language would indicate that you haven't liked at it much as a language.

Sure, most of the matrix operations and tight loops are implemented in FORTRAN or C++, but that's for performance reasons. The same would happen with Python, and I don't think it would be fair to call Python a scripting language either; it also has a ton of Lisp like qualities.

Re:Rsuite – R development and data science platform by sargram01 on Saturday December 14, 2019 @03:24PM (#21791957)
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.
Re:Rsuite – R development and data science platform by kgwgk on Saturday December 14, 2019 @03:42PM (#21792091)

  # cat /tmp/test.R
  x <- 1:10
  y <- 1:20
  plot(x, y)

  # R --quiet
  > source("/tmp/test.R")
  Error in xy.coords(x, y, xlabel, ylabel, log) :
    'x' and 'y' lengths differ
  > traceback()
  8: stop("'x' and 'y' lengths differ")
  7: xy.coords(x, y, xlabel, ylabel, log)
  6: plot.default(x, y)
  5: plot(x, y) at test.R#3
  4: eval(ei, envir)
  3: eval(ei, envir)
  2: withVisible(eval(ei, envir))
  1: source("/tmp/test.R")
If you mean the lines in the packages you used, I think you'll see the lines if you build them with keep.source=TRUE
Re:Rsuite – R development and data science platform by CreRecombinase on Saturday December 14, 2019 @03:57PM (#21792198)
It's so crazy easy to start R in gdb:

  R -d gdb
that's it!
Re:Rsuite – R development and data science platform by ksevastyanenko on Saturday December 14, 2019 @04:42PM (#21792477)
You might find this package useful https://github.com/robertzk/bettertrace
Re:Rsuite – R development and data science platform by Zelazny7 on Saturday December 14, 2019 @06:47PM (#21793242)

  options(error=recover)
Re:Rsuite – R development and data science platform by LegitShady on Saturday December 14, 2019 @10:26PM (#21794254)
All the design brief said was get started anything beyond that is a change request
Re:Rsuite – R development and data science platform by Cosi1125 on Sunday December 15, 2019 @04:39AM (#21795334)
What are you talking about? Of course it was written in lower-level, compiled languages. Is it any different than Python? Javascript? Perl?

As for the "easy iterop with other languages": [1]

So, how is R different from Python?

Also, it's not true that R wasn't designed for writing software. Even a critical "pamphlet" by Pat Burns [2] states otherwise. For writing statistical software, yes.

--

[1] https://wiki.python.org/moin/IntegratingPythonWithOtherLangu... [2] https://www.burns-stat.com/pages/Present/infernoishR_annotat...