Adam Witney | 2 Apr 10:17 2012
Picon

Re: data into R from Perl arrays


The quickest way to do this specific example is probably to just save your R commands to a file (eg
R_commands.R) and then run some kind of system/exec/backtick function in your perl script to invoke R,
something like (untested):

#!/usr/bin/perl
use strict;
use warnings;
system( 'R --file R_commands.R' );

Alternatively if you want perl and R to be able to interact and pass data back and forth, you could use
something like Statistics::R

http://search.cpan.org/~fangly/Statistics-R-0.27/lib/Statistics/R.pm

HTH

adam

On 2 Apr 2012, at 06:21, José Ramón Blas Pastor wrote:

> Hi,
> 
> a very simple doubt, but I do not know how to manage this.
> 
> I want to plot a histogram for all data in 'datos.txt'.
> 
> a) by using R:
> datos<-scan("datos.txt")
> pdf("xh.pdf")
(Continue reading)

Roy Chaudhuri | 2 Apr 12:33 2012
Picon

Re: data into R from Perl arrays

Alternatively you could go for a Perl-only approach using something like 
GD::Graph::Histogram.

Cheers,
Roy.

On 02/04/2012 09:17, Adam Witney wrote:
>
> The quickest way to do this specific example is probably to just save
> your R commands to a file (eg R_commands.R) and then run some kind of
> system/exec/backtick function in your perl script to invoke R,
> something like (untested):
>
> #!/usr/bin/perl use strict; use warnings; system( 'R --file
> R_commands.R' );
>
> Alternatively if you want perl and R to be able to interact and pass
> data back and forth, you could use something like Statistics::R
>
> http://search.cpan.org/~fangly/Statistics-R-0.27/lib/Statistics/R.pm
>
> HTH
>
> adam
>
> On 2 Apr 2012, at 06:21, José Ramón Blas Pastor wrote:
>
>> Hi,
>>
>> a very simple doubt, but I do not know how to manage this.
(Continue reading)

Fields, Christopher J | 2 Apr 14:59 2012

Re: data into R from Perl arrays

Not sure how well it is supported, but there is also Statistics::useR (which has an XS layer for conversing
with R).

https://metacpan.org/module/Statistics::useR

chris

On Apr 2, 2012, at 3:17 AM, Adam Witney wrote:

> 
> The quickest way to do this specific example is probably to just save your R commands to a file (eg
R_commands.R) and then run some kind of system/exec/backtick function in your perl script to invoke R,
something like (untested):
> 
> #!/usr/bin/perl
> use strict;
> use warnings;
> system( 'R --file R_commands.R' );
> 
> Alternatively if you want perl and R to be able to interact and pass data back and forth, you could use
something like Statistics::R
> 
> http://search.cpan.org/~fangly/Statistics-R-0.27/lib/Statistics/R.pm
> 
> HTH
> 
> adam
> 
> On 2 Apr 2012, at 06:21, José Ramón Blas Pastor wrote:
> 
(Continue reading)

Florent Angly | 3 Apr 00:30 2012
Picon

Re: data into R from Perl arrays

To execute R commands from Perl, you can also try Statistics::R 
(http://search.cpan.org/~fangly/Statistics-R-0.27/lib/Statistics/R.pm 
<http://search.cpan.org/%7Efangly/Statistics-R-0.27/lib/Statistics/R.pm>), 
which has been around for longer, and which I have recently refactored.
Regards,
Florent

On 02/04/12 22:59, Fields, Christopher J wrote:
> Not sure how well it is supported, but there is also Statistics::useR (which has an XS layer for conversing
with R).
>
> https://metacpan.org/module/Statistics::useR
>
> chris
>
> On Apr 2, 2012, at 3:17 AM, Adam Witney wrote:
>
>> The quickest way to do this specific example is probably to just save your R commands to a file (eg
R_commands.R) and then run some kind of system/exec/backtick function in your perl script to invoke R,
something like (untested):
>>
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>> system( 'R --file R_commands.R' );
>>
>> Alternatively if you want perl and R to be able to interact and pass data back and forth, you could use
something like Statistics::R
>>
>> http://search.cpan.org/~fangly/Statistics-R-0.27/lib/Statistics/R.pm
(Continue reading)

Yifei Huang | 3 Apr 02:41 2012
Picon

Re: data into R from Perl arrays

You may try RSPerl.

http://www.omegahat.org/RSPerl/

Yifei

2012/4/2 Florent Angly <florent.angly <at> gmail.com>

> To execute R commands from Perl, you can also try Statistics::R (
> http://search.cpan.org/~**fangly/Statistics-R-0.27/lib/**Statistics/R.pm<http://search.cpan.org/%7Efangly/Statistics-R-0.27/lib/Statistics/R.pm><
> http://search.cpan.org/%**7Efangly/Statistics-R-0.27/**lib/Statistics/R.pm<http://search.cpan.org/%7Efangly/Statistics-R-0.27/lib/Statistics/R.pm>>),
> which has been around for longer, and which I have recently refactored.
> Regards,
> Florent
>
>
> On 02/04/12 22:59, Fields, Christopher J wrote:
>
>> Not sure how well it is supported, but there is also Statistics::useR
>> (which has an XS layer for conversing with R).
>>
>> https://metacpan.org/module/**Statistics::useR<https://metacpan.org/module/Statistics::useR>
>>
>> chris
>>
>> On Apr 2, 2012, at 3:17 AM, Adam Witney wrote:
>>
>>  The quickest way to do this specific example is probably to just save
>>> your R commands to a file (eg R_commands.R) and then run some kind of
>>> system/exec/backtick function in your perl script to invoke R, something
(Continue reading)


Gmane