Skip to main content
11 events
when toggle format what by license comment
Feb 23, 2023 at 7:35 history notice removed Sotos Recommended answer in R Language
Feb 23, 2023 at 7:35 history notice added Sotos Recommended answer in R Language
Nov 1, 2022 at 13:35 history edited zephryl CC BY-SA 4.0
clarify reason for coercing key types; formatting
Sep 4, 2021 at 3:12 comment added Daman deep What about cross join from dplyr?
Mar 8, 2019 at 21:16 comment added Ghose Bishwajit Yes I meant dataframe. But they are not the same structure as some are missing on certain rows. For four dataframes, I have data on four different indicators (GDP, GNP GINI, MMR) for different number of countries. I want to join the dataframes in a way that keeps only those countries present for all four indicators.
Mar 8, 2019 at 13:53 comment added abhy3 @GhoseBishwajit Assuming you mean rest of the dataframes instead of columns, you could use rbind on df2, df3 and df4 if they have same structure e.g. semi_join(df1, rbind(df2, df3, df4))
Feb 24, 2019 at 20:12 comment added Ghose Bishwajit Could one use semi_join(df1, df2, df3, df4) to keep only observations in df1 that match the rest of the columns?
Sep 29, 2016 at 15:35 history edited Andrew Barr CC BY-SA 3.0
update answer for completeness
Sep 28, 2016 at 19:09 history edited Andrew Barr CC BY-SA 3.0
dplyr is no longer a new package, so I deleted the word "new"
Oct 11, 2014 at 3:37 comment added Aleksandr Blekh Why do you need to convert CustomerId to numeric? I don't see any mentioning in documentation (for both plyr and dplyr) about this type of restriction. Would your code work incorrectly, if the merge column would be of character type (especially interested in plyr)? Am I missing something?
Feb 6, 2014 at 21:35 history answered Andrew Barr CC BY-SA 3.0