How can i select a subset of information with mathematica 9?

Oscar,

You probably want:

Part[Select[data, And[#[[1]] == “1 VTS”,#[[7]]==“Female”] &], All, 3]

This will only give you the values in column 3 for the entries that correspond to 1 VST and females. If you also want to see the word “Female” in those entries, then you would do:

Part[Select[data, And[#[[1]] == “1 VTS”,#[[7]]==“Female”] &], All, {3,7}]

You could also extract the columns 3 and 7 for both males and females (for 1 VTS) and then segregate males and females into two sublists. That would be:

GatherBy[Part[Select[data, #[[1]] == “1 VTS” &], All, {3,7}],#[[2]]&]

If after this segregation you no longer want to keep the values “Male” and “Female”, then you could do:

Drop[GatherBy[Part[Select[data, #[[1]] == “1 VTS” &], All, {3,7}],#[[2]]&],None,None,2]

This is what I meant when I said you could use this to plot both datasets in the same graph (with different plot markers). The output of the command above should be a list consisting of two sublists (probably of different lengths), and each one of those is just a list of numbers. If you do a ListPlot of the output, then you should get such a plot. The x-axis will just be a counter.

Hope it helps,

OL.

Thanks Otto,

I tried the code, but for some reason is not working, i don’t know if i doing something wrong.

Thank you very much