Assumes the only other columns other than 'key' and 'val' are expression measurements

spread_expression_df_to_matrix(df, key, value)

Arguments

df

A tidy data frame.

key

Column name for the column containing gene names.

value

Column name for the column containing sample IDs.

Value

x A matrix containing the expression results