несколько гистограмм вверху друг друга без бинов

Допустим, у меня есть этот фрейм данных с двумя уровнями: LC и HC. Now i want to get 2 plots like below on top of eachother.

data <- data.frame(
    welltype=c("LC","LC","LC","LC","LC","HC","HC","HC","HC","HC"),
    value=c(1,2,1,2,1,5,4,5,4,5))

The code to get following plot =

x <- rnorm(1000)
y <- hist(x)
plot(y$breaks,
   c(y$counts,0),
   type="s",col="blue")

(with thanks to Joris Meys)

So, how do I even start on this. Since I'm used to java I was thinking of a for loop, but I've been told not to do it this way.

enter image description here

7
задан Sir Ksilem 18 May 2011 в 12:08
поделиться