-1

hopefully very simple question.

I have run a couple simulations in R and I would like to combine the results. I just want them to be a full data set, the example below gives the data as I have it now:

ssgdpdata
[1]  2267855  3745197  2061319  5835743 13927068  2524601

sbln
[1]  795010.9  801039.2  973765.6 1069474.0

And the below is how I would like the data to look:

Total
[1]  2267855  3745197  2061319  5835743 13927068  2524601  795010.9  801039.2  973765.6 1069474.0

That will allow me to perform the analysis I require on the data. This data is just an example and I will have 100,000+ observations when I run the simulations properly. I assume this is a really easy fix but I have tried to merge and bind the data but I can't get it right.

lmo
  • 37,904
  • 9
  • 56
  • 69
SCan
  • 19
  • 1
  • 4
    use `c` to concatenate them: `c(ssgdpdata, sbln)` – lmo Jun 30 '16 at 15:08
  • 1
    Is your data really in vectors? If not here is how to make a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5965451#5965451) so that we can help you. – Paul Rougieux Jun 30 '16 at 15:12

1 Answers1

1

It is a little unclear to me what you want to do. Does this little script answer your question?

test1<-c(1,2,3)
test2<-c(4,5,6)
combined<-append(test1,test2)
Austin
  • 326
  • 1
  • 5
  • That works perfectly, thank you very much. I thought it might be a simple solution but I have spent the last hour trying unsuccessfully. Thanks again. – SCan Jun 30 '16 at 15:13