[R] strange behaviour of certain fields in data frame after rbind
Joris DeWolf
Joris.DeWolf at cropdesign.com
Thu May 8 13:56:11 CEST 2003
Can anybody explain me what is going wrong with the rbind command or how
I could avoid the problem?
I have a script with loops which time has a dataframe as output (called
T2sbdata). After each loop I would like to append that dataframe to the
results I obtained from the previous loops (called T2sbdataALL) and use
for that purpose rbind.
Below a part of the loop and the result I get. The rbind command does it
job as I would expect, but cannot append the column PTGEvent properly.
I use R Version 1.6.2 under Linux.
Thanks
Joris
print("how original data look like")
print(T2sbdataALL[1:8])
print("how data to be appended look like")
print(T2sbdata[1:8])
T2sbdataALL <- rbind(T2sbdataALL,T2sbdata)
print("How all data look after rbind")
print(T2sbdataALL[1:8])
[1] "how original data look like"
IDSSB IDSeed CDnr PTGEvent ExpNr IDExp WPSNumber
TypeExp
35 12102 150008 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
36 12103 150328 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
37 12104 150307 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
38 12105 150327 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
39 12106 150304 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
40 12107 149693 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
41 12108 150303 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
42 12109 149698 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
43 12110 150320 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
44 12111 150301 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
45 12112 150034 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
[1] "how data to be appended look like"
IDSSB IDSeed CDnr PTGEvent ExpNr IDExp WPSNumber
TypeExp
46 12113 150335 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
47 12114 150032 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
48 12115 150293 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
49 12116 150599 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
50 12117 150332 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
51 12118 150287 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
52 12119 150595 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
53 12120 150038 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
54 12121 150286 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
55 12122 150333 CD3629 OS0934-09A E0.000.003.205 3116 YD03_17b
Confirmation
[1] "How all data look after rbind"
IDSSB IDSeed CDnr PTGEvent ExpNr IDExp WPSNumber
TypeExp
35 12102 150008 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
36 12103 150328 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
37 12104 150307 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
38 12105 150327 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
39 12106 150304 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
40 12107 149693 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
41 12108 150303 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
42 12109 149698 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
43 12110 150320 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
44 12111 150301 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
45 12112 150034 CD3629 OS0934-07A E0.000.003.205 3116 YD03_17b
Confirmation
46 12113 150335 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
47 12114 150032 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
48 12115 150293 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
49 12116 150599 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
50 12117 150332 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
51 12118 150287 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
52 12119 150595 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
53 12120 150038 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
54 12121 150286 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
55 12122 150333 CD3629 <NA> E0.000.003.205 3116 YD03_17b
Confirmation
--
======================================================================
Joris De Wolf
CropDesign N.V.
Plant Evaluation Group
Technologiepark 3
B-9052 Zwijnaarde
Belgium
Tel. : +32 9 242 91 55
Fax : +32 9 241 91 73
======================================================================
The information contained in this email is confidential and may ... {{dropped}}
More information about the R-help
mailing list