Dear R-users,

I would like to create a new data frame composed of 2 columns of another
data frame. But it does not give me what I want...

> casesCNST[1:10,]
   case X1 X2 X3 X4 expected
1    A1  0  0  0  0        E
2    A2  0  0  0  1        C
3    A3  0  0  0  2        C
4    A4  0  0  0  3        C
5    A5  0  0  0  4        C
6    A6  0  0  1  0        C
7    A7  0  0  1  1        C
8    A8  0  0  1  2        C
9    A9  0  0  1  3        C
10  A10  0  0  1  4        C

> expectedCNST <- data.frame (cbind (casesCNST$case, casesCNST$expected))

> expectedCNST[1:10,]
    X1 X2
1    1  4
2  112  3
3  223  3
4  334  3
5  445  3
6  556  3
7  593  3
8  604  3
9  615  3
10   2  3

Why does the variables change ?!?

Thanks !

Delphine



Delphine Fontaine
Statistician
Data & Statistics Department - Genexion SA
------------------------------------------------------------
29, Quai du Mont-Blanc
Geneva, CH-1201
Switzerland
------------------------------------------------------------
Office: +41 22 704 32 44
Fax:    +41 22 704 32 42
Email: Delphine.Fontaine@genexion.com


	[[alternative HTML version deleted]]


