doubles<-numeric(length(journey)-1) doubles2<-c(rep(0,length(journey)-1)) Do these two lines of code produce an equivalent object? Many thanks