in reply to Re^2: in Statistics::R, startR breaks open
in thread in Statistics::R, startR breaks open
works fine (for me, the relative path goes to the directory "C:/Program Files/R/R-2.8.1/Statistics-R/"). I think relative path issues are discussed elsewhere. My workaround is:... $R->startR; open FH, ">", "c:/scripts/test2.txt" or die $!; ...
Note: I didn't actually need to open a file while communicating with R, but that wouldn't be hard to do. Thank you again.#!/usr/bin/perl use warnings; use strict; use Cwd; use Statistics::R; my $currentdir = cwd(); my $R = Statistics::R->new(); open FH, ">", "test1.txt" or die $!; $R->startR; $R->stopR; chdir($currentdir); open FH, ">", "test2.txt" or die $!;
|
|---|