From: Randy Morgan Date: 2013-01-31T23:56:53+09:00 Subject: Re: Select "columns" from multidimensional array? --047d7b414e8cdfee8404d49686a5 Content-Type: text/plain; charset=ISO-8859-1 Hi Joel, Worth mentioning that transpose requires each "row" to contain the same number of "columns" or you will get an index error. Here's a Gist on how to alter Array#transpose to allow a block for populating missing elements. https://gist.github.com/3876888 Best randym On Thu, Jan 31, 2013 at 11:14 PM, Joel Pearson wrote: > Thanks robert > > My current approach is > HTML Table -> Nokogiri Nodeset -> Multidimensional Array -> Excel / TSV > > A Matrix looks like a useful way of grabbing the values I need when I > have to alter specifics in the data. > > -- > Posted via http://www.ruby-forum.com/. > > --047d7b414e8cdfee8404d49686a5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Joel,=A0

Worth mentioning that transpose requires eac= h "row" to contain the same number of "columns" or you = will get an index error.

Here's a Gist on how to alt= er Array#transpose to allow a block for populating missing elements.

https://gis= t.github.com/3876888

Best=A0

randym

On Thu, Jan 31, 2013 at = 11:14 PM, Joel Pearson <lists@ruby-forum.com> wrote:
Thanks robert

My current approach is
HTML Table -> Nokogiri Nodeset -> Multidimensional Array -> Excel = / TSV

A Matrix looks like a useful way of grabbing the values I need when I
have to alter specifics in the data.

--047d7b414e8cdfee8404d49686a5--