From 621cd88c23184ea37d684ebe67f055aaea7d7ddb Mon Sep 17 00:00:00 2001 From: Daria Zenkova Date: Thu, 1 Sep 2016 21:00:52 +0300 Subject: [PATCH] size and colour work better now, but there are problems with discrete sizes --- R/createES.R | 2 +- R/pcaPlot.R | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/R/createES.R b/R/createES.R index 1a323f8..a9587da 100644 --- a/R/createES.R +++ b/R/createES.R @@ -1,7 +1,7 @@ createES <- function(data, pData, labelDescription, colNames, rowNames) { exprs <- data colnames(exprs) <- colNames - truePData <- t(pData) + truePData <- pData pd <- data.frame(truePData, row.names = colNames) names(pd) <- labelDescription require(Biobase) diff --git a/R/pcaPlot.R b/R/pcaPlot.R index 13802f7..ff5c387 100644 --- a/R/pcaPlot.R +++ b/R/pcaPlot.R @@ -26,6 +26,7 @@ pcaPlot <- function(es, columns, c1, c2, size="", colour="") { aes <- aes(x=eval(parse(text=xs[c1])), y=eval(parse(text=xs[c2])), colour=c) } else if (size != "" && colour == "") { + class(pData[[size]]) <- "numeric" s <- pData[[size]]; aes <- aes(x=eval(parse(text=xs[c1])), y=eval(parse(text=xs[c2])), size=s) -- GitLab