diff shm_csr.r @ 4:477e95b098fd draft

Uploaded
author davidvanzessen
date Mon, 31 Oct 2016 05:05:26 -0400
parents 275ab5175fd6
children 012a738edf5a
line wrap: on
line diff
--- a/shm_csr.r	Thu Oct 27 09:40:45 2016 -0400
+++ b/shm_csr.r	Mon Oct 31 05:05:26 2016 -0400
@@ -280,8 +280,10 @@
 		transition2 = merge(transition2, base.order, by.x="variable", by.y="base")
 
 		transition2[is.na(transition2$value),]$value = 0
+		
+		print(transition2)
 
-		if(any(transition2$value == 0)){ #having rows of data but a transition table filled with 0 is bad
+		if(any(transition2$value != 0)){ #having rows of data but a transition table filled with 0 is bad
 			print("Plotting stacked transition")
 			png(filename=paste("transitions_stacked_", name, ".png", sep=""))
 			p = ggplot(transition2, aes(factor(reorder(id, order.x)), y=value, fill=factor(reorder(variable, order.y)))) + geom_bar(position="fill", stat="identity", colour="black") #stacked bar