Pandas like features

bachmeier no at spam.net
Thu Nov 12 19:09:48 UTC 2020


On Thursday, 5 November 2020 at 22:46:21 UTC, data pulverizer 
wrote:
> On Thursday, 5 November 2020 at 22:17:12 UTC, data pulverizer 
> wrote:
>> On Thursday, 5 November 2020 at 22:02:25 UTC, bachmeier wrote:
>>> R has externalptr, but to my knowledge, that's only for 
>>> transporting around C objects. I don't know of any way to 
>>> call R API functions with data not allocated by R.
>>
>> Yes but you make C calls in R on the pointed object. Given the 
>> choice that's how I would write any application in R. The only 
>> purpose R would serve is as an interface to the underlying 
>> dlls. I have many years of writing code in R and from my 
>> experience, apart from minor instances I would try to avoid 
>> writing production libraries or code in it.
>
> p.s. I'm not saying that data shouldn't be accessible or 
> returned in R, I'm just saying that externalptr is there for 
> other pointed objects that R might need to interface with. I 
> hope that's clear - avoiding writing production code in R is 
> just my professional advice.

It really depends (which was one of the points of my earlier post 
about how broad this field is). For someone doing academic 
research or statistical analysis for, say, marketing purposes, 
the interactive code they write is the production code. They're 
not going to write two versions of their code. I know for web 
applications or finance or some other areas where the distinction 
matters.

But as far as telling people "don't write code in R", that's 
simply a non-starter, and there's no reason to even begin a 
project like this if you're going to tell people to avoid 
existing libraries in either R or Python. They'll just shrug when 
you start talking about performance because for the vast majority 
of what they're doing it's not an issue.


More information about the Digitalmars-d mailing list