Alternative to cbind to append vectors with diferent row number

I´m trying to append the result of a loop which produces a vector with different length (the model output). Unfortunatley cbind only works if the vectors have the same length. How can I solve this? Thank you.

d <- lapply(1:10, function(i) {model <- code
df_total <-, d)

transit <- head(long_vector, excess_rows)
parked <- tail(long_vector,excess_rows)
stow <- cbind(transit,short_vector)
arrive <- rbind(parked,stow)

Should work. See the FAQ: How to do a minimal reproducible example reprex for beginners for what to do to attract more and better answers (I haven't reversed engineered an example to test my pcode.)

This topic was automatically closed 21 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.