I want to add the column ride_length but this erroe is showing in Rstudio, please guide me
code: all_trips$ride_length <- difftime(all_trips$endded_at,all_trips$started_at)
Error:
Error in $<-.data.frame
(*tmp*
, ride_length, value = numeric(0)) :
replacement has 0 rows, data has 5667717