3
$\begingroup$

I have multiple Datasets that have a common data structure, e.g.:

Dataset1 = T (K) | B (T) | R (Ohm)
             1   |    1  |   1
             1   |    2  |   2

Dataset2 = T (K) | B (T) | R (Ohm)
             2   |    1  |   3
             2   |    2  |   4

I cannot figure out how to append the rows together from the datasets to get one large dataset like:

Dataset3 = T (K) | B (T) | R (Ohm)
             1   |    1  |   1
             1   |    2  |   2
             2   |    1  |   3
             2   |    2  |   4

I tried the Append function, but that does not seem to work. I'm sure there is something silly that I'm not getting.

$\endgroup$
3
  • 2
    $\begingroup$ Have you tried Join[]? $\endgroup$ Commented Aug 8, 2016 at 4:44
  • $\begingroup$ Welcome! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – user9660
    Commented Aug 8, 2016 at 8:28
  • $\begingroup$ @J.M. - Join[] works! I figured that it was simple. If you put an answer to this question I will accept it. $\endgroup$
    – NickLH
    Commented Aug 10, 2016 at 3:17

1 Answer 1

4
$\begingroup$

Join will do the trick:

{dataset1, dataset2} =
  {{{1, 1, 1}, {1, 2, 2}}, {{2, 1, 3}, {2, 2, 4}}} // Map[Dataset]

pair of datasets

Join[dataset1, dataset2]

joined dataset

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.