Error in levels<-
(*tmp*
, value = as.character(levels)) : factor level [2] is duplicated
因为有重复的基因名字
I believe it is because you have duplicates in the features you wish to plot
sum(duplicated(markers.to.plot))
Seurat::DotPlot(subset_data,features = c("Csf1","Csf1","Csf2rb"),group.by = "stim")
Error in `levels<-`(`*tmp*`, value = as.character(levels)) :
factor level [2] is duplicated