+ Reply to Thread
Results 1 to 2 of 2

Thread: MERGE issues

  1. #1
    Points: 150, Level: 2
    Level completed: 50%, Points required for next Level: 50

    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MERGE issues




    I've run this code (almost exactly) before and have not had issues but now I keep getting an error saying:

    ERROR IN FIX.BY(BY.X,X) : 'BY' MUST SPECIFY A UNIQUELY VALID COLUMN.

    I have one data set (myDATA) that has the following columns:
    ROW ID DATE X

    I have another data set (myDATA2) that has the following columns:
    ROW2 Y

    I'm trying to merge them by ROW = ROW2 and have the following code:

    DATA_combo <- merge(myDATA, myDATA2, by.x="ROW", by.y="ROW2", all=FALSE)

    But that does not work. Is something wrong with this code? I've done this exact code multiple times with other data sets and have had no issues so I don't understand what is wrong now.

  2. #2
    Points: 150, Level: 2
    Level completed: 50%, Points required for next Level: 50

    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MERGE issues


    Nevermind......apparently the ROW column was added a second time and I didn't see it (I'm not much of an R user).

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats