in reply to Help with Mean/Median for data analysis

This its a trivial task with GNU-R. If you plan to go further and do more complex statistics in your data, I suggest you to take a look at the Statistics::R module in cpan and call directly R from perl. Something like:

use Statistics::R; my $R = Statistics::R->new(); $R->run(q`mydata <-read.table("mydatafile",... more options here)`); my $summary = $R->get(q`summary(mydata)`); print $summary;

Only as a quick example and untested, but you can see that you will need to write less code to do the same. You can use any other statistic modules that you prefer of course

Replies are listed 'Best First'.
Re^2: Help with Mean/Median for data analysis
by Marshall (Canon) on Dec 22, 2011 at 12:58 UTC
    I think that would be like using nuclear weapons to kill an ant!

    The real issue here appears to be: how to parse the input into a "record". Once that is done, its just a few lines to get the statistics required.

      Well, I only look over the post so I probably may be wrong, but probably the factor function of R could help here. I understand that the OP wants to apply as.factor to i.e the start column (or at the columns one to three concatenated).