Commit b7b95736 authored by Daria Zenkova's avatar Daria Zenkova

some minor changes according to fixes in js application

parent 937f9820
...@@ -6,17 +6,11 @@ ...@@ -6,17 +6,11 @@
#' pcaPlot(es.norm, 1, 2) + aes(color=time) #' pcaPlot(es.norm, 1, 2) + aes(color=time)
#' @export #' @export
pcaPlot <- function(es, columns=c(), rows=c(), c1, c2, size="", colour="") { pcaPlot <- function(es, columns=c(), rows=c(), c1, c2, size="", colour="") {
с1 <- as.numeric(c1) n1 <- as.numeric(c1)
c2 <- as.numeric(c2) n2 <- as.numeric(c2)
stopifnot(require(ggplot2)) stopifnot(require(ggplot2))
stopifnot(require(Biobase)) stopifnot(require(Biobase))
if (is.na(size)) {
size = ""
}
if (is.na(colour)) {
colour = ""
}
if (is.null(rows)) { if (is.null(rows)) {
rows <- 1:nrow(exprs(es)) rows <- 1:nrow(exprs(es))
} }
...@@ -43,21 +37,21 @@ pcaPlot <- function(es, columns=c(), rows=c(), c1, c2, size="", colour="") { ...@@ -43,21 +37,21 @@ pcaPlot <- function(es, columns=c(), rows=c(), c1, c2, size="", colour="") {
pp <- ggplot(data=cbind(as.data.frame(pca$x), pData)) pp <- ggplot(data=cbind(as.data.frame(pca$x), pData))
if (size != "" && colour != "") { if (size != "" && colour != "") {
aes <- aes_string(x=xs[c1], aes <- aes_string(x=xs[n1],
y=xs[c2], colour=colour, size=size) y=xs[n2], colour=colour, size=size)
} else if (colour != "") { } else if (colour != "") {
aes <- aes_string(x=xs[c1], aes <- aes_string(x=xs[n1],
y=xs[c2], colour=colour) y=xs[n2], colour=colour)
} else if (size != "") { } else if (size != "") {
aes <- aes_string(x=xs[c1], aes <- aes_string(x=xs[n1],
y=xs[c2], size=size) y=xs[n2], size=size)
} else { } else {
aes <- aes_string(x=xs[c1], aes <- aes_string(x=xs[n1],
y=xs[c2]) y=xs[n2])
} }
pp + pp +
geom_point(aes) + geom_point(aes) +
xlab(xlabs[c1]) + ylab(xlabs[c2]) xlab(xlabs[n1]) + ylab(xlabs[n2])
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment