Re: [R] class "matrix" lost when extracting a row from matrix

2010-09-19 Thread Tobias Verbeke
On 09/19/2010 10:02 AM, h...@wiseadvice.eu wrote: Good morning experts! situation: class(myMatrix)="matrix" class(myMatrix[(1:2),]))="matrix" class(myMatrix[1,])= "character" consequences are far reaching as, for instance colnames(myMatrix[(1:2),]) != colnames(myMatrix[1,]) or names(myMatrix[

[R] class "matrix" lost when extracting a row from matrix

2010-09-19 Thread h...@wiseadvice.eu
Good morning experts! situation: class(myMatrix)="matrix" class(myMatrix[(1:2),]))="matrix" class(myMatrix[1,])= "character" consequences are far reaching as, for instance colnames(myMatrix[(1:2),]) != colnames(myMatrix[1,]) or names(myMatrix[(1:2),]) != names(myMatrix[1,]) My question: 1.