I have the following data stored in a string. This data is composed of
many records.
This is a single record:
2008-01-22,88.34,98.56,86.68,96.54,2175600,96.54
This is the string:
"2008-01-22,88.34,98.56,86.68,96.54,2175600,96.542008-01-18,92.23,96.58,90.77,92.98,3812400,92.982008-01-17,96.37,97.30,86.84,89.36,3753200,89.362008-01-16,101.74,103.33,94.16,95.43,2902800,95.432008-01-15,98.92,105.25,98.51,103.28,1881900,103.282008-01-14,96.30,102.44,96.30,100.52,1113900,100.522008-01-11,101.56,104.70,94.16,96.24,1516300,96.242008-01-10,102.00,103.85,98.03,102.78,1853800,102.782008-01-09,101.87,103.50,97.42,102.85,1205300,102.852008-01-08,105.00,109.50,101.89,102.28,1563800,102.282008-01-07,108.76,109.00,99.50,105.18,1779400,105.182008-01-04,110.27,110.45,106.49,107.54,1386000,107.542008-01-03,115.71,116.00,110.63,111.40,1213500,111.402008-01-02,116.75,119.00,113.20,115.24,1619800,115.24
\n"
I need to get the first element (2008-01-22) followed by the last
element (96.54) out for each record so I graph them.
Does anyone know of a way to perform this task?
thanks
jackster
···
--
Posted via http://www.ruby-forum.com/.