df_to_mat: Convert tidy dataframe into matrix

Description Usage Arguments Details Value

Description

Converts a tidy dataframe into a numeric matrix.

Usage

1
2
df_to_mat(tidydf, logdata, tech_reps, convert_neg = TRUE,
  AB_col = "Antibody.Name")

Arguments

tidydf

Tidy dataframe of RFI values to convert to matrix.

logdata

Single logical indicating whether the raw RFI values should be logged.

tech_reps

Single logical indicating whether there are technical replicates.

convert_neg

Single logical indicating whether negative values should be converted to zero (0).

AB_col

Name of the column containing antibody name or number, as string. These names or numbers will become rownames of the output matrix.

Details

If the tidy dataframe contains technical replicates with the same sample names, unique sample names will be created by add a group row number to the the end of the sample name.

Useful for functions that require data to be in matrix format like pheatmap and plotMA.

Value

A numeric matrix where each row is an antibody and each column is a sample.


lucyleeow/RPPA documentation built on May 5, 2019, 3:46 a.m.