Need help with basic R function:
Firstly order non-decreasing sequence from 4 different sequences and then order those 4 sequences into one.
Im totally green in programing so please make it the simplest way possible.
Edit1: puting some input data as required
A={3,2,1,2}
B={6,7,5,8}
C={12,11,9,10}
D={65,43,76,13}
I would like it to first order each sequence, so
A={1,2,2,3}
B={5,6,7,8}
C={9,10,11,12}
D={13,43,65,76}
and then to merge it
ABCD={1,2,2,4,5,6,7,8,9,10,11,12,13,43,65,76}
If you want a function that takes vectors A, B, C, and D and input and outputs a sorted version of them, you can try:
And then you can run it with something like:
If you wanted to write a function that combined and sorted any number of inputs, you could try: