[r] assign headers based on existing row in dataframe in R