Hello - I've uploaded csv files and used the read.csv function correctly in advance of merging spreadsheets. However, the merge() function isn't working, as the error message says I'm using column names that aren't exactly the same. I've checked the spreadsheet column names several times, and believe all eight (8) column names are identical on each of the three (3) spreadsheets I'm attempting to merge. After typing in the exact column names in the input and getting the error message telling me the 'by' must specify one or more columns as numbers, names or logical, I took that to mean I should use column identifiers (A, B, C,...) so I tried that too but that apparently wasn't what it meant. Again, I'm as sure as can be that the column names are identical. Thanks, in advance for your advise.
Here is the URL: Posit Cloud
and here are the inputs/error messages:
df1 <- read.csv("cyclistic_july_2022.csv")
df2 <- read.csv("cyclistic_august_2022.csv")
df3 <- read.csv("cyclistic_september_2022.csv")
merged_df <- merge(df1, df2, df3, by = c("ride_id", "rideable_type", "ride_length", "day_of_week", "month_day_year", "start_time", "end_time", "member_casual"))
Error in fix.by(by.x, x) :
'by' must specify one or more columns as numbers, names or logical
merged_df <- merge(df1, df2, df3, by=c("ride_id", "rideable_type", "ride_length", "day_of_week", "month_day_year", "start_time", "end_time", "member_casual"))
Error in fix.by(by.x, x) :
'by' must specify one or more columns as numbers, names or logical
merged_df <- merge(df1, df2, df3, by = c("A", "B", "C", "D", "E", "F", "G", "H"))
Error in fix.by(by.x, x) :
'by' must specify one or more columns as numbers, names or logical
-->