| melt.gct {cmapR} | R Documentation |
data.table
(aka 'melt')Utilizes the melt.data.table function to
transform the
matrix into long form. Optionally can include the row and column
annotations in the transformed data.table.
melt.gct(...) melt_gct( g, suffixes = NULL, remove_symmetries = FALSE, keep_rdesc = TRUE, keep_cdesc = TRUE, ... ) ## S4 method for signature 'GCT' melt_gct( g, suffixes = NULL, remove_symmetries = FALSE, keep_rdesc = TRUE, keep_cdesc = TRUE, ... )
... |
further arguments passed along to |
g |
the GCT object |
suffixes |
the character suffixes to be applied if there are collisions between the names of the row and column descriptors |
remove_symmetries |
boolean indicating whether to remove
the lower triangle of the matrix (only applies if |
keep_rdesc |
boolean indicating whether to keep the row descriptors in the final result |
keep_cdesc |
boolean indicating whether to keep the column descriptors in the final result |
a data.table object with the row and column ids and
the matrix
values and (optinally) the row and column descriptors
Other GCT utilities:
annotate.gct(),
merge.gct(),
rank.gct(),
subset.gct()
# simple melt, keeping both row and column meta
head(melt_gct(ds))
# update row/colum suffixes to indicate rows are genes, columns experiments
head(melt_gct(ds, suffixes = c("_gene", "_experiment")))
# ignore row/column meta
head(melt_gct(ds, keep_rdesc = FALSE, keep_cdesc = FALSE))