I have two data frames corresponding to a specific individual. What I want is to merge these data frames into one in such a way that the first column of both data frames will be merged, considering their similarity. The second column will correspond to the count of the first data frame, and the third column will correspond to the count of the second data frame. How do i do this in rstudio?
This is my working code:
merged_df <- full_join(df1, df2, by = “category”)
merged_df <- select(merged_df, “category”, df1$V1, df2$V1)
It should look like this
Thanks!