[R] Warning messages when using rbind

gug guygreen at netvigator.com
Sun Jun 21 04:16:07 CEST 2009


Hello,

I have been using a very simple rbind approach (simple enough for me to
understand) to combine data files within R.

It seems to work fine, but then generates warning messages for reasons that
I can't begin to understand.  The text below shows the issue.  

testread12=read.table("C:/Files/Test100.txt", head = T)
testread11=read.table("C:/Files/Test101.txt", head = T)
testbind1=rbind(testread12,testread11)
testbind2=rbind(testread11,testread12)

The testrbind1 line generates the following message:

"Warning message:
In `[<-.factor`(`*tmp*`, ri, value = c(0.00557998, -0.058016069,  :
  invalid factor level, NAs generated"

However the testrbind2 line works fine.  Although the data in the files is
different, the format (columns, etc) should be identical.  The fact that it
works in one order, but not the other, makes it very difficult for me to
understand what the problem is.

Files attached.  Any suggestions gratefully received.  Thanks,

Guy Green
http://www.nabble.com/file/p24130996/Test101.txt Test101.txt 
http://www.nabble.com/file/p24130996/Test100.txt Test100.txt 
-- 
View this message in context: http://www.nabble.com/Warning-messages-when-using-rbind-tp24130996p24130996.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list