I have a seurat object "gunion.data". The metadata for gunion.data@meta.data$orig.ident is either "control, "ischemia", "synIRI" or "alloIRI". I would like to change ""synIRI" and "alloIRI" into "other".
I tried this
gunion.data@meta.data$orig.ident["alloIRI"] <- "other"
but it gave me an error: Error in $<-.data.frame(tmp, orig.ident, value = c("control", "control", : replacement has 26933 rows, data has 26932
How should I format the code to change all "alloIRI" and "synIRI" in the data into "other"?