From 6e908a1c272c7c2565036306888cdc74a120672e Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 10 Aug 2017 08:41:39 -0700 Subject: [PATCH] plot bugs from the beginning of time and remove negative trends --- debbugs.Rnw | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/debbugs.Rnw b/debbugs.Rnw index 973de09..4131fcf 100644 --- a/debbugs.Rnw +++ b/debbugs.Rnw @@ -147,15 +147,17 @@ scientific_10 <- function(x) { \section{Bugs in Debian} \subsection{Bug Reporting Rate} -\begin{frame}{How many bugs do we have?} +\begin{frame}{Bugs from the beginning of time} \begin{center} <>= bug.growth <- fread("data/sorted_bug_growth_for_r_every_500.txt") colnames(bug.growth) <- c("time","bugs") bug.growth <- bug.growth[pmax(bugs) <= as.numeric(bugs),] bug.growth <- bug.growth[order(time),] -bug.growth <- - bug.growth[c(0,diff(bugs))>=0,] +while (bug.growth[,any(c(0,diff(bugs)) < 0)]) { + bug.growth <- + bug.growth[c(0,diff(bugs))>=0,] +} bug.growth[,date:= as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+ as.numeric(bug.growth$time))] @@ -166,7 +168,7 @@ print(ggplot(bug.growth,#[date > as.POSIXct(ISOdatetime(2005,1,1,0,0,0)),], aes(x=date,y=bugs))+ xlab("Time")+ylab("Bugs filed in Debian")+ scale_y_continuous(labels = scientific_10)+ - geom_point()+stat_smooth(method="lm")) + geom_point()) @ \end{center} \end{frame} -- 2.39.2