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
  • 7,287
  • 3
  • 36
  • 66

2 Answers2

0

Try,

union(c('a', 'b', 'c', 'd'), c('x', 'y', 'z'))
[1] "a" "b" "c" "d" "x" "y" "z"
Nad Pat
  • 3,129
  • 3
  • 10
  • 20
0

Just use c to concatenate two vectors

c(a, b)
akrun
  • 874,273
  • 37
  • 540
  • 662