edit_tar | R Documentation |
Replace existing entries in a chosen column of a targets file with desired ones.
edit_tar(df.tar, column, old, new, sub.row)
df.tar |
The data frame of a targets file. |
column |
The column to edit, either the column name or an integer of the column index. |
old |
A vector of existing entries to replace, where the length must be the same with |
new |
A vector of desired entries to replace that in |
sub.row |
A vector of integers corresponding to target rows for editing, or a vector of TRUE and FALSE corresponding to each row. Default is all rows in the targets file. |
A data.frame
.
Jianhai Zhang jzhan067@ucr.edu
Dr. Thomas Girke thomas.girke@ucr.edu
Mustroph, Angelika, M Eugenia Zanetti, Charles J H Jang, Hans E Holtan, Peter P Repetti, David W Galbraith, Thomas Girke, and Julia Bailey-Serres. 2009. “Profiling Translatomes of Discrete Cell Populations Resolves Altered Cellular Priorities During Hypoxia in Arabidopsis.” Proc Natl Acad Sci U S A 106 (44): 18843–8
sh.tar <- system.file('extdata/shinyApp/data/target_arab.txt', package='spatialHeatmap')
target.sh <- read_fr(sh.tar)
target.sh.new <- edit_tar(df.tar=target.sh, column='conditions', old=c('control', 'hypoxia'),
new=c('C', 'H'), sub.row=c(1:12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.