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.
我有看起来像这样的数据
df <- data.frame(c("Cell1","Cell2","NK-Cell"),c("K","L","S","L","K","S","S","L","K"),abs(log2(abs(rnorm(180))))) colnames(df) <- c("ctype","tissue","exp")
我正在尝试创建一个看起来像这样的情节。
在这种情况下,一般的想法是使用刻面来获得这种情节。
ggplot(df,aes(exp))+geom_density()+facet_grid(tissue~ctype)
有两个空图,因为 没有 的Cell2值,tissue S也没有的NK-Cell值tissue L。
Cell2
tissue S
NK-Cell
tissue L