Spread, but keep the key column

spread_keep(df, key, value, ...)

Arguments

df

data frame

key

bare/unquoted key as in spread

value

bare/unquoted value as in spread

...

additional arguments to spread

Value

spread data frame with key column retained