Hi, I have the following test script:
-----
#!/usr/bin/perl
use warnings;
use strict;
use Statistics::R;

my $R = Statistics::R->new();
$R->startR;

$R->send(qq`x <- c(1,2,3) \n print (x)`);
my $ret = $R->read;
print "Result: $ret\n";

$R->send(qq`x <- c(1,2,3) \n shapiro.test (x)`);
$ret = $R->read;
print "Result: $ret\n";

$R->stopR();
-----
The output from this is:
Result: [1] 1 2 3
Result:

Whereas, if I do it interactively in R I get:
-----
> x <- c(1,2,3)
> print (x)
[1] 1 2 3
> x <- c(1,2,3)
> shapiro.test (x)

        Shapiro-Wilk normality test

data:  x
W = 1, p-value = NA
-----

Statistics::R is for some reason not giving me the result of the 
shapiro.test(x) command. It's not just that it's the second one, if I print 
twice I get two results, if I do the test twice I get two blanks back. If I 
try with another test, eg. wilcox.test, the same thing happens.

Does anyone know why this is and what I can do to fix it? It makes 
Statistics::R somewhat less useful if you can't use it to do statistics...

-- 
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D

Attachment: pgpSIUNcWBk5Q.pgp
Description: PGP signature

Reply via email to