I am currently a bit stuck on the following problem. I have generated a load of csv tables looking rather like this:
units,1,2,3,4,5,6
1,0,0,0,0,0,0
2,0,0,0,0,0,0
3,0,0,1,1,0,0
4,0,4,0,0,0,0
5,0,3,0,0,0,0
6,0,0,0,0,0,0
7,0,0,0,0,0,0
8,0,0,0,0,0,0
9,1,0,0,0,0,0
The x-axis (1-6) is "type", and the y-axis (1-9) is a count, the value in the table being the number of things of that type and length (e.g. there is one thing of length 9 and type 1).
I need to obtain the mean and standard deviation for position in the table, over all the tables (e.g. what is the mean number/SD of things of type 1 and length 9 over many tables?). Something involving matrices seems like the way to go, such as described
here. However, I've no idea how to perform the calculations and return a table containing the mean and and SD values once I've got the data into a matrix (and that's hard enough ;).
Can anyone offer a suggestion?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.