Skip to content
Prev 139296 / 398506 Next

Converting a data frame with values into a matrix/

Hi Henrique,
Thanks for your tip. 


how can I map xx onto xy (where xy is a matrix I
created).
Mike Carl Gene James Dough
A    1    1    1     1     1
C    1    1    1     1     1
B    1    1    1     1     1


If I can map xx onto xy, I can have '1' without NAs.

Thanks
Srini
--- Henrique Dallazuanna <wwwhsd at gmail.com> wrote:

            
matrix(1,length(unique(xx$Class)),length(unique(xx[,1])))