Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个单细胞 RNA 测序矩阵“dta”,其中一些细胞以 KK00 (KK00.xx) 命名。我想取消选择所有这些单元格。所以我写了dta.s <-subset(dta, !grepl('KK00',colnames(dta)))
dta.s <-subset(dta, !grepl('KK00',colnames(dta)))
它没有给出错误,但当我检查时似乎 KK00.xx 单元格仍然存在table(sapply(strsplit(colnames(dta.s), "\\."), function(x) {x[1]}))。
table(sapply(strsplit(colnames(dta.s), "\\."), function(x) {x[1]}))
有人可以帮忙吗?
最好的
我已经解决了这个问题。
我改变了这个
对此
dta <- dta[,!grepl('KK00.', colnames(dta))]
现在,它起作用了。