Hello everyone, I am new to the community, I am doing my first project in R Studio. I am having problems joining several data frames with the bind_rows function and when executing the line of code the R section restarts, can someone help me please?
Hi @Virgen_Diego ,
As a first step, could you post a screenshot that shows what you mean?
When you do all_trips <- list() that not a list of names, that's a list of four datasets.
It's probably easier to do
library(readr)
Divvy_Trips_2019_Q1 <- read_csv("data/Divvy_Trips_2019_Q1.csv")
Divvy_Trips_2019_Q2 <- read_csv("data/Divvy_Trips_2019_Q2.csv")
Divvy_Trips_2019_Q3 <- read_csv("data/Divvy_Trips_2019_Q3.csv")
Divvy_Trips_2019_Q4 <- read_csv("data/Divvy_Trips_2019_Q4.csv")
# the column names are different, so these datasets won't rbind until we fix that
colnames(Divvy_Trips_2019_Q2) <- colnames(Divvy_Trips_2019_Q1)
colnames(Divvy_Trips_2019_Q3) <- colnames(Divvy_Trips_2019_Q1)
colnames(Divvy_Trips_2019_Q4) <- colnames(Divvy_Trips_2019_Q1)
Divvy_Trips_2019 <- rbind(Divvy_Trips_2019_Q1, Divvy_Trips_2019_Q2, Divvy_Trips_2019_Q3, Divvy_Trips_2019_Q4)
Is this a homework assignment, @Virgen_Diego ?
I think the problem is just that your Posit Cloud account is not set up to deal with that much data — you code works fine on my machine.
