[R] qqplot: bar outline colour?

Dagmar Ramgad82 at gmx.net
Mon Dec 19 12:06:36 CET 2016


Dear all,

Apearantly noone in this great mailing list could help me with my 
problem a couple of days ago. As I still struggle with part of the 
problem I try to explain my problem differently:

# This is my example data:
     exdatframe <- data.frame(Name=c("Ernie","Ernie","Ernie", 
"Leon","Leon","Leon"),
recordedTime=c("03.01.2011","04.01.2011","05.01.2011",
"04.01.2011","05.01.2011","06.01.2011"),
                      knownstate =c("breeding","moulting","moulting",
                              "breeding","breeding",NA))
     exdatframe
     str(exdatframe)
     exdatframeT <- as.POSIXct 
(strptime(as.character(exdatframe$recordedTime),"%d.%m.%Y"))
     exdatframeT
     exdatframe2 <- cbind(exdatframe, exdatframeT)
     exdatframe2$recordedTime <-NULL
     exdatframe2
     str(exdatframe2)

# I made this plot:

n <- ggplot(exdatframe2, aes(exdatframeT,Name)) + 
geom_tile(aes(fill=knownstate), colour="black", height=0.5)
n

# my question: How do I get a bar outline colour around all of breeding 
that is not interupted each day (I only want vertical bars between 
different "knownstates")

# Help would be terribly much appreciated!!!!



More information about the R-help mailing list