[R] matrix rows to single numeric element

Wegan, Michael (DNRE)
Thu, 04 Aug 2011 21:45:44 -0000

I have a matrix of 5 columns and 64 rows, let's call it "mat1".
All values are 1 or 0.  I need to take the values of the elements by row and
create a single numeric element that can be placed its respective slot in a
64-element list, named "list1".  For example, mat1[11,1:5] = 0,1,1,0,1
and I must put 01101, with a length of 1, into the 11th element of list1.  I can
create the code for an iterative process, but am having a great deal of
difficulty in figuring out how to create a single element from the row values,
especially when the first value is 0, as in my example.


Thanks in advance.

	[[alternative HTML version deleted]]