in reply to Statistics::R question

Use

my $command = q`a<-read.table("/usr/local/projects/file")`; print "Running [$command]\n"; $R->send($command);

and

my $file="/usr/local/projects/file"; my $command = q`a<-read.table($file)`; print "Running [$command]\n"; $R->send($command);

to see what happens and what the first cause is. Then look at perlop, especially at the "Quotes and Quote-like operators" to see what causes this behaviour of Perl and what to change.

Replies are listed 'Best First'.
Re^2: Statistics::R question
by david_lyon (Sexton) on Apr 06, 2011 at 13:49 UTC
    Thanks corion for your pointer to help.
    
    
    This now works, not sure if its the proper way.
    
    my $file="/usr/local/projects/file";
    my $command = "a<-read.table(\"$file\")";
    print "Running $command\n";
    $R->send($command);
    
    
    Thanks again!