[R] Joining data frames
Esthi Erickson
er|ck@one@th| @end|ng |rom gm@||@com
Tue Jun 29 17:12:28 CEST 2021
Hi and thank you in advance,
If I have a dataframe, df:
Sample
Plot
Biomass
1
1
1024
1
2
32
2
3
223
2
4
456
3
1
3
2
331
3
3
22151
3
4
1441
And another one, df1:
Sample
Plot
% cover of plant1
% cover of plant2
3
1
32
63
3
2
3
3
3
3
3
4
5
23
I want to join these tables where the columns Sample and Plot are the same.
Currently trying:
df<- right_join(df, df1, by = c(“Sample”, "Plot"))
I am working with a much larger dataset, but it will cut off the data
starting at Sample 3 instead of joining the tables while retaining the
information from df. Any ideas how I could join them this way?
Esthi
[[alternative HTML version deleted]]
More information about the R-help
mailing list