Dataset setting | Merge

I have 4 datasets and for analysis, we need to merge them into one
How to do it ?

Also I have second dataset Q2,whose columns are not in sync as per the other dataset,How to rename it

Also if i am trying to rename ,it is shwoing errors

library(dplyr)
Q2 <- Q2 %>% rename(V1= trip_id, V2=start_time, V3=end_time, V4=bike_id, V5=trip_duration,V6=from_station_id, V7=from_station_name, V8=to_station_id, V9=to_station_name, V10=user_type, V11=gender, V12=birth_year)
Error in UseMethod("rename") :

ERROR
no applicable method for 'rename' applied to an object of class "list"

You can learn about joining relational data here : 13 Relational data | R for Data Science (had.co.nz)
Otherwise; we would need more info to advise you.

about your rename issue; its clear from the error that Q2 is a mere list, and not one that is a data.frame which is what rename is designed to operate on.

Here is a link to our reprex guide for if you want to provide examples of your start data.

1 Like

This book have a good examples.

Try to identify the common variables or id for merge this data set.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.