Re: [R] how to melt variable to one variable

2013-11-23 Thread arun
Hi, I am not getting any errors. data_chir <- read.table(text="N1_re N2_re N3_re yes no no no yes no na yes yes no na no",sep="",header=TRUE,stringsAsFactors=FALSE,na.strings="na") library(reshape2) melt(data_chir, measure.vars=c("N1_re", "N2_re"), var="zpd")   N3_re   zpd value 1    no N1_re   ye

[R] how to melt variable to one variable

2013-11-23 Thread maggy yan
I want to make a stacked bar plot with one bar for two variables from my data "chir", the two variables have about 100 values like no, yes and na. I want to show how many no, yes and na they both have together with the stacked bar. I tried to melt these to variables first like this: melt1=melt(dat