4
Suppose I have two different date frames.:
print(DADOS_1)
linha coluna1 coluna2
1 1 3
2 3 4
3 1 1
4 2 2
print(DADOS_2)
linha coluna3 coluna4
1 3 1
2 2 2
3 5 0
4 2 4
5 1 3
6 3 1
I need to unite DADOS_1
and DADOS_2
by columns, that is, that unite laterally. The result should be this:
print(DADOS_1+2)
linha coluna1 coluna2 coluna3 coluna 4
1 1 3 3 1
2 3 4 2 2
3 1 1 5 0
4 2 2 2 4
5 NA NA 1 3
6 NA NA 3 1
I tried to use the function bind_cols
but she came back to me with the following mistake:
Error: Argument 2 must be length 36550, not 138383
Which in this case is saying that it is not possible to merge my two data.frames because they both have different sizes.
What should I do to join my two date frames of different sizes by columns in R?
thank you for the answer I will test.
– Izak Mandrak