Description Usage Arguments Value Author(s) See Also Examples
View source: R/updateRowDataCol.R
Updates the values in a single column of the rowData
of
SummarizedExperiment
objects.
1 | updateRowDataCol(x, updateCol, value)
|
x |
Object of type |
updateCol |
Name or the number of the column in the |
value |
The new Replacing values. |
Returns an object of type SummarizedExperiment
.
Ali Oghabian
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | test<- mdsChr22Obj
# See the the frequency of each intron type annotation
table(rowData(test)$intron_type)
#Change U2 to u2
newIntType<- as.character(rowData(test)$intron_type)
newIntType[newIntType=="U2" &
!is.na(newIntType=="U2")]<- "u2"
#Updating values
test<- updateRowDataCol(test, updateCol="intron_type",
value=newIntType)
#See the frequency of the updated intron type annotations
table(rowData(test)$intron_type)
#Adding a new column
test<- updateRowDataCol(test, updateCol="new_column",
value=rep(NA, nrow(rowData(test))) )
head(rowData(test))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.