[R] merge dataframes with condition

Geophagus
Fri, 16 Nov 2012 09:21:41 -0000

Refering the discussed issue:  As a result I have dataframe like the
following.

animal<-c("bear","lion","monkey","fish","zebra")
S<-c(10,20,40,5,12)
N<-c(5,8,15,26,1)
Z<-c(24,12,8,7,2)
R<-c(21,14,2,5,3)
Q<-c(13,9,9,16,1)
df1<-data.frame(animal,S,N,Z,R,Q)

Now, I want to plot it as a stacked barchart so that it looks like on the
example below.
examp3.png <http://r.789695.n4.nabble.com/file/n4649714/examp3.png>

It's clear to me, that I have to transform the frame again - but I'm not
quite sure how to do it.

Thanks GeO



--
View this message in context: