Re:Debugging Compiled Code for R with Positron
by vhhn on Friday November 01, 2024 @01:42PM
(#42019537)
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.
Re:Debugging Compiled Code for R with Positron
by stevenae on Friday November 01, 2024 @02:15PM
(#42019924)
Fellow R / Polars user here. How (in what applications) do you use DuckDB?
Re:Debugging Compiled Code for R with Positron
by tylermw on Friday November 01, 2024 @08:57PM
(#42023153)
DuckDB is great for medium data: Too big for memory, but small enough to fit on local storage. It's also extremely performant for loading data and supports a wide range of storage backends. It's also really well integrated with R and can really speed up certain queries, as long as the DuckDB engine can translate them to valid SQL.
Re:Debugging Compiled Code for R with Positron
by nickforr on Friday November 01, 2024 @01:06PM
(#42019135)
A large number of statistical packages in R make use of C++ for their core algorithms. See here, for example: https://cran.r-project.org/web/packages/Rcpp/index.html
Re:Debugging Compiled Code for R with Positron
by jasonpbecker on Friday November 01, 2024 @01:56PM
(#42019686)
>> As someone who basically uses R as a nice LISP-y scripting language to orchestrate calling low-level compiled code from other languages
Except... this is exactly was R was created to do, with a focus on mathematical/statistical libraries written in things like FORTRAN.
R is great as a glue language for these purposes if the purpose of calling that low-level compiled code is largely to work with data and especially if that data is not so large/computationally intensive to work with that it does not need to be distributed across hardware.
Re:Debugging Compiled Code for R with Positron
by setgree on Friday November 01, 2024 @02:14PM
(#42019917)
I think I got a little confused by the language here, my mistake
Re:Debugging Compiled Code for R with Positron
by napoleongl on Friday November 01, 2024 @04:46PM
(#42021385)
Another strength of R, albeit via the tidyverse-package, is in data manipulation. It excels in taking some misfit, human friendly, pile of excel-sheets with implied relations and turning it into rectangular data sets that can actually be analysed. Sure there are faster alternatives if you are doing big data, but if you need versatility R is a good friend.
Re:Debugging Compiled Code for R with Positron
by wdkrnls on Friday November 01, 2024 @10:21PM
(#42023600)
Tyler is actually using R for exactly what R and it's predecessor S were designed to do since the beginning. You can read more about it's history by googling John Chambers who helped develop S at Bell Labs.
> As someone who basically uses R as a nice LISP-y scripting language to orchestrate calling low-level compiled code from other languages
When I read this, I think, would `bash` or something equally portable/universally installed work?
R is a beautiful thing when limited to its core uses But in my experience, the more we build away from those core uses, the more brittleness we introduce. I wish the Posit team would focus on the core R experience, resolve some of the hundreds of open issues on its core packages in a timely way [0,1], and just generally play to R's strengths.
[0] https://github.com/rstudio/rmarkdown/issues
[1] https://github.com/tidyverse/ggplot2/issues