I'm performing item response theory with eRm packages
I am excluding the persons that doesn't fit in the infit/outfit persons.
for that I created a condition. then I have to create a new subset or
matrix but with the condition.

So:

ORIGINAL

matrix<-cbind(item1, item2, item3, item4)

IF I PERFORM A head(matrix)

item1 item2 item3 item4
  3         2       3       1
  3         1       2       4

THEN I CREATE THE LOGIC CONDITION

z<-thing==T

THEN I TRY TO CREATE THE NEW MATRIX BUT WITH THE CONDITION

matrix2<-cbind(item1[z==T], item2[z==T], item3[z==T], item4[z==T])

THE ISSUE IS THAT IF I PERFORM A head(matrix2)

 I1        I2       I3      I4
  3         2       3       1
  3         1       2       4

The names of the columns change at all.

CAN ANYONE HELP ME TO KEEP THE SAME NAMES?

	[[alternative HTML version deleted]]

