completed the complete.R function by rbinding a vector into dataframe