【发布时间】:2022-09-25 19:31:57
【问题描述】:
我有一个修拉对象“gunion.data”。 gunion.data@meta.data$orig.ident 的元数据是 \"control、\"ischemia\"、\"synIRI\" 或 \"alloIRI\"。我想更改 \"\"synIRI\"和 \"alloIRI\" 到 \"other\"。
我试过这个
gunion.data@meta.data$orig.ident[\"alloIRI\"] <- \"other\"
但它给了我一个错误: $<-.data.frame 中的错误(时间, orig.ident, value = c(\"control\", \"control\", : 替换有 26933 行,数据有 26932
我应该如何格式化代码以将数据中的所有 \"alloIRI\" 和 \"synIRI\" 更改为 \"other\"?