How can I plot the mean of such a list: http://pastebin.com/dNjeR4WC which contains an alternating number of elements in the sublists and some sublists that are empty and should not be considered in the plot (the corresponding mean does not exist).
Example:
{{},{},{},{1,2},{1,2,3},{4,5},{3,4,5,6,7},{},{2,3,4,5,6},{6}}
For the upper example I would like to plot:
{{},{},{},Mean[{1,2}],Mean[{1,2,3}],Mean[{4,5}],Mean[{3,4,5,6,7}],{},
Mean[{2,3,4,5,6}],Mean[{6}]}
{{}, {}, {}, {1, 2}, {1, 2, 3}, {4, 5}, {3, 4, 5, 6, 7}, {}, {2, 3, 4, 5, 6}, {6}} // DeleteCases[{}] // Map[Mean] // ListPlot
? $\endgroup$If[# =!= {}, Mean[#], #] & /@ list
? $\endgroup$Table[Mean[a[[i]]], {i, Length[a]}] /. Mean[{}] -> {}
? $\endgroup$ListLinePlot[{{}, {}, {}, 3/2, 2, 9/2, 5, {}, 4, 6} /. {} -> Missing[]]
? $\endgroup$