0

Sorry I could not find similar questions here.

I am trying to combine two data frames,

a <- c(a, b, c, d)
b <- c(x, y, z)

result should be

result <- c(a,b,c,d,x,y,z)

I have tried paste, it did not work.

Phil
  • 5,491
  • 3
  • 26
  • 61

2 Answers2

0

Try,

union(c('a', 'b', 'c', 'd'), c('x', 'y', 'z'))
[1] "a" "b" "c" "d" "x" "y" "z"
Nad Pat
  • 2,995
  • 3
  • 9
  • 19
0

Just use c to concatenate two vectors

c(a, b)
akrun
  • 789,025
  • 32
  • 460
  • 575