Message Boards Message Boards

0
|
12956 Views
|
5 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Join data with Dates?

Posted 6 years ago
POSTED BY: Jos Klaps
5 Replies

The (N+1)th solution:

{#[[1, 1]], Sequence @@ #[[All, 2]]} & /@ GatherBy[data1~Join~data2, First]
POSTED BY: Henrik Schachner
POSTED BY: Jos Klaps
Normal[GroupBy[Join[data1, data2], First -> Last, 
       Sequence @@ # &]] /. {Rule -> List}


SplitBy[Sort[Join[data1, data2]], First] /. 
 z : {{_List, _Integer} ..} :> {First[First[z]],  Sequence @@ z[[All, 2]]}

lots of ways ;-)

POSTED BY: David Reiss
POSTED BY: Hans Michel

You could try:

Merge[{Rule@@@Data1,Rule@@@Data2},Identity]
List@@@Normal[%]
Prepend[#2,#1]&@@@%
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract