Skip to content

Commit

Permalink
Fix POD, fix grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
dolmen committed Aug 12, 2011
1 parent 8ad5f04 commit 19f3286
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions lib/R/YapRI.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package R::YapRI;


Expand All @@ -8,15 +7,16 @@ package R::YapRI;

=head1 NAME
R::YapRI.pm
Just the doc. for R::YapRI modules.
R::YapRI - Yet Another Perl R Inteface
=cut

our $VERSION = '0.04';
$VERSION = eval $VERSION;

1;
__END__
=head1 SYNOPSIS
use R::YapRI::Base;
Expand All @@ -39,23 +39,16 @@ $VERSION = eval $VERSION;
=head1 DESCRIPTION
Yet another perl wrapper to interact with R.
R::YapRI are a collection of modules to interact with R using Perl.
C<R::YapRI> is a collection of modules to interact with R using Perl.
The mechanism is simple, it write R commands into a command file and
executate it using the R as command line:
R [options] < infile > outfile
The mechanism is simple, it writes R commands into a command file and
execute it using the R as command line:
use R::YapRI::Base;
my $rbase = R::YapRI::Base->new();
$rbase->add_command('x <- c(1:10)');
$rbase->add_command('y <- c(2,3,5,7,11,13,17,19,23,29)');
$rbase->add_command('x * y');
my $resultfile = $rbase->get_result_file();
R [options] < infile > outfile
More information about the basic usage can be found: L<R::YapRI::Base>.
More information about the basic usage can be found in L<R::YapRI::Base>.
But there are some tricks, it can define blocks and combine them, so it can
But there are some tricks. It can also define blocks and combine them, so it can
extend the interaction between packages of information. For example, it can
create a block to check the length of a vector using default as base
Expand All @@ -74,23 +67,34 @@ create a block to check the length of a vector using default as base
More information about the use of blocks can be found at L<R::YapRI::Block>.
It can use interpreters (L<R::YapRI::Interpreter::Perl>), so sometimes
it can use perl hashref. instead strings to add_commands.
it can use perl HASHREF instead of strings to C<add_command>.
$rbase->add_command('mean(c(2,3,5,7,11,13,17,19,23,29))');
$rbase->add_command({ mean => [2,3,5,7,11,13,17,19,23,29]});
It uses two switches to trace the R commands that you are running:
- disable_keepfiles/enable_keepfiles, to do not delete the command files and
the result files after the executation of the code.
=over 4
=item *
disable_keepfiles/enable_keepfiles, to not delete the command files and
the result files after the execution of the code.
- disable_debug/enable_debug, to print as STDERR the R commands from the
command file before executate them.
=item *
There are some examples of modules that wrap L<R::YapRI::Base> for an extended
disable_debug/enable_debug, to print to C<STDERR> the R commands from the
command file before executing them.
=back
=head1 ADVANCED FEATURES
Here are some examples of modules that wrap L<R::YapRI::Base> for an extended
functionality.
* Matrix manipulation L<R::YapRI::Data::Matrix>
=head2 Matrix manipulation L<R::YapRI::Data::Matrix>
use R::YapRI::Base;
use R::YapRI::Data::Matrix;
Expand All @@ -111,7 +115,7 @@ functionality.
my $eigenvectors = read_rbase($rbase, 'BLOCK1', 'eigenvect1');
* Simple graph creation L<R::YapRI::Graph::Simple>
=head2 Simple graph creation L<R::YapRI::Graph::Simple>
use R::YapRI::Base;
use R::YapRI::Data::Matrix;
Expand Down Expand Up @@ -158,6 +162,8 @@ Naama Menda
Jonathan "Duke" Leto
Olivier "dolmen" MenguE<eacute>
=head1 PUBLIC REPOSITORY
Hosted at GitHub: L<https://github.com/solgenomics/yapri>
Expand Down

0 comments on commit 19f3286

Please sign in to comment.