com_factor {spatialHeatmap} | R Documentation |
This is a helper function for data/aSVGs involving three or more factors such as sample, time, condition. It combine factors in targets file to make composite factors.
com_factor(se, target, factors2com, sep = ".", factor.new)
se |
A |
target |
A |
factors2com |
A character vector of column names or a numeric vector of column indeces in the targets file. Entries in these columns are combined. |
sep |
The separator in the combined factors. One of |
factor.new |
The column name of the new combined factors. |
If se
is provided, a SummarizedExperiment
object is returned, where the colData
slot contains the new column of combined factors. Otherwise, adata.frame
object is returned, where the new column of combined factors is appended.
Jianhai Zhang jzhan067@ucr.edu; zhang.jianhai@hotmail.com
Dr. Thomas Girke thomas.girke@ucr.edu
Narsai, Reena, David Secco, Matthew D Schultz, Joseph R Ecker, Ryan Lister, and James Whelan. 2017. "Dynamic and Rapid Changes in the Transcriptome and Epigenome During Germination and in Developing Rice (Oryza Sativa) Coleoptiles Under Anoxia and Re-Oxygenation." Plant J. 89 (4): 805–24
clp.tar <- system.file('extdata/shinyApp/example/target_coleoptile.txt', package='spatialHeatmap') target.clp <- read_fr(clp.tar) target.clp <- com_factor(target=target.clp, factors2com=c('organism_part', 'age'), factor.new='samTime')