sub setup_R { #Uses R library #R= '/usr/local/src/RSPerl/R.pm'; #my $R = Statistics::R->new( bin => $fullpath ); #use lib "/usr/local/src/RSPerl/src/"; #use lib "/usr/local/pl/libAll/Statistics-R-0.27/lib/Statistics/"; #use lib "/usr/local/pl/libAll/Regexp-Common-2011121001/lib/"; #use lib "/usr/local/perl5.16.0/lib/site_perl/5.16.0/"; use lib "/usr/local/src/RSPerl/src/"; use R; #Allows use of R references called between Perl and R use RReferences; #Starts the R module &R::startR("--silent"); #Sets the output for R plots, "pdf" for *.pdf output. "X11" to simply pull up on screen R::call("pdf"); #Sets the X and Y limits for the plot @xlim=R::c(0,5000); @ylim=R::c(-5,2); #Calls for a blank plot by putting one point at -10,-10 which is off the plotting area, sets labels and limits as specified R::callWithNames("plot",{'x',-10,'y',-10,xlim,\@xlim,ylim,\@ylim,xlab,'Frequency(Hz)',ylab,'LN(A/A0)'});