Adds a column with number of elements different than the number of rows of the data frame we want to fill the column. cbind does not work in this scenario.

add_to_df(df, v)

Arguments

df

a data frame where we want to include a columns probably with dimensions different than the ones the data.frame allows

v

a vector containing values to be added as column