Spread a key-value pair across multiple columns in nested dataframe

spread_nested(df, key_var, value_var)

Arguments

df

A nested dataframe

var_key

Column name or position

var_value

Column name or position