[R] Problem with binding data-frames

Junnila, Jouni Jouni.Junnila at PERKINELMER.COM
Mon Jun 18 09:48:09 CEST 2007


Hello,

I'm having a problem concerning r-binding datasets.

I have six datasets, from six different plates, and two different days.
I want to combine these datasets together for analysis. Datasets from
day 2, have all the same columns than datasets from day 1. However in
addition, there are few columns more in day 2. Thus, using rbind for
this, results a error, because the objects are not the same length. 

Error in paste(nmi[nii == 0L], collapse = ", ") : 
        object "nii" not found
In addition: Warning message:
longer object length
        is not a multiple of shorter object length in: clabs == nmi 


What I need, is to combine all the six together, and give for example
NA-value in day 1, for those columns which can only be found in day 2.
Is this somehow possible?

I have several of these six-datasets groups, and only few of them are
having this problem described above, and I cannot know in advance which.
With most of the groups writing
rbind(data1,data2,data3,data4,data5,data6)
works easily, but these few problematic groups need also to be
combined... 
Any help greatly appreciated!

-Jouni



More information about the R-help mailing list