How to merge / join two parts of data

Hello,

I'm searching for solution to store two parts of numbers and join them together.

For example:
one_portion <- c(1, 3, 5, 7, 9)
second_portion <- c(3, 4, 5)

Now I want to achive something like this:
joined_portions = (1, 3, 3, 4, 5, 5, 7, 9)

How can I achieve this? I tried store numbers as vectors and lists, but cannot join them together to get result what I wanted.

Best Regards
Daniel

Is this what you are looking for?

one_portion <- c(1, 3, 5, 7, 9)
second_portion <- c(3, 4, 5)
joined_portion <- sort(c(one_portion, second_portion))
joined_portion
[1] 1 3 3 4 5 5 7 9

Exactly :slight_smile: Thank you very much :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.