Be sure to post here when you create a group/movement working towards this goal.
There is already at least one group doing that and quite well but is not catching up IMO with other alternatives, e.g. python. I am talking about *officially* directing *funding* and man-power to this or similar projects which may have a + net-effect on establishing Perl, again, in Research, Universities, AI. (I am not affiliated with that or any other project, neither I know any of those working on them). The distinction between officially spearheading a project/direction and individually or in groups creating CPAN modules must be clear even to a not-so-well-meaning observer.
My suggested experiment is a means to assess how much potential breaks and how much effort to fix them. I said "clone" because some modules will have to be modified in order to be "fixed" for the new version. 10x is an ad-hoc multiplier to extrapolate the findings from code which has been peer-reviewed, tested and used under many circumstances by thousands (CPAN modules), to code which is private/corporate and lives in dungeons, rarely seen by more than 50 people.
Statistics::R is just a way to send and receive to an R process. It leaves a lot to be desired, e.g. getting back data structures from R, re: the omni-present data.frame. This is what I am talking about and not about reading the stdout of an R session which is trivial.
# see https://www.dummies.com/programming/r/how-to-create-a-data-frame
+-from-scratch-in-r/
use Statistics::R;
my $R = Statistics::R->new();
my $out = $R->run(<<EOR);
employee <- c('John Doe','Peter Gynn','Jolie Hope')
salary <- c(21000, 23400, 26800)
startdate <- as.Date(c('2010-11-1','2008-3-25','2007-3-14'))
employ.data <- data.frame(employee, salary, startdate)
str(employ.data)
EOR
my $frame = $R->get('employ.data');
use Data::Dumper;
print Dumper($frame);
$VAR1 = [
'employee',
'salary',
'startdate',
'1',
'John',
'Doe',
'21000',
'2010-11-01',
'2',
'Peter',
'Gynn',
'23400',
'2008-03-25',
'3',
'Jolie',
'Hope',
'26800',
'2007-03-14'
];
Typical scenario: I want to plot data just scraped with Perl using R's excellent ggplot which works mostly with data.frame. Or, I want to get statistics metrics of some other data from Perl and R provides that easily and reliably but it requires to convert R's results back to a Perl object. Which is not trivial but also not impossible. Again, I should think official support is very important for these projects. I may be naive here but the example I cite with opencv could be resolved if perl guts could be altered to scope better and keep its internals airthight. For comparison, python pandas have converters from/to R structures, e.g. data.frame.
bw, bliako |