[R] Bug in Merge?

Edwin Sendjaja edwin7 at web.de
Fri Apr 18 23:22:16 CEST 2008


Hello,


I find strange number in my merge data set.

My first coloumn consist row numbers.

-----------------------------------------------------------
my.data:


                    AbsTime           RelTime     PE_ID    Event      Delay

4238   1208514343.812086    107.153637  4           EKA      51620

##################################
Host.data:


     ID   Host

4   4    vicky.planetlab.ntua.gr

------------------------------------------------------------

data<-read.table("my.data")
mapping<-read.table("Host.data")

mergeXY <- merge(data,mapping, by.x="PE_ID", by.y="ID")


If I merge these data then i get:

    "PE_ID" "AbsTime" "RelTime" "Ereignis"  "Delay" "Host"
"2" 4 1208514343.81209 107.153637 "EndpointKeepAlive" " 
51620 "vicky.planetlab.ntua.gr"


-------------------------------------------------------

The first problem:

Why is the row number "2" now? Where does this nummber come from?

I think, there is a conflict between my row number from data and mapping (4238 
and 4).

The second problem:

Why is my AbsTime: 1208514343.81209? It was 1208514343.812086. It is 1 digit 
less. how can I avoid this?



I hope someone could answer this.



Thank you in advance,



Edwin



More information about the R-help mailing list