From 8a57c72c0a8279d739221707cc8fb8dfd1b0f9d0 Mon Sep 17 00:00:00 2001 From: Becky Reamy Date: Wed, 29 May 2019 10:30:38 -0400 Subject: [PATCH] Line graphs were not showing time concepts in order --- web-app/Rscripts/LineGraph/LineGraphLoader.r | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web-app/Rscripts/LineGraph/LineGraphLoader.r b/web-app/Rscripts/LineGraph/LineGraphLoader.r index 48378ed8..973172c4 100644 --- a/web-app/Rscripts/LineGraph/LineGraphLoader.r +++ b/web-app/Rscripts/LineGraph/LineGraphLoader.r @@ -12,6 +12,7 @@ LineGraph.loader <- function( library(plyr) library(ggplot2) library(Cairo) + library(gtools) require(RColorBrewer) line.data<-read.delim(input.filename, header=T, stringsAsFactors = FALSE) @@ -30,6 +31,7 @@ LineGraph.loader <- function( scaling.data <- read.delim(scaling.filename, header=T, stringsAsFactors = FALSE) } } else { # if scaling file is not available, each level of group (concept path) will be plotted at the number of that level + line.data <- line.data[mixedorder(line.data$GROUP),] scaling.data <- data.frame(GROUP = unique(line.data$GROUP), VALUE = 1:length(unique(line.data$GROUP)), stringsAsFactors = FALSE) } # assign the X-axis position to each row