Skip to content

Commit

Permalink
update functions
Browse files Browse the repository at this point in the history
  • Loading branch information
frahik committed Aug 8, 2018
1 parent 70defd8 commit 93cc1f8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions R/Generic_Methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,15 @@ boxplot.BFRCV <- function(x, select = 'Pearson', ordered = TRUE, ...){
if (length(unique(results$Env)) > 1) {
results$TxE <- paste0(results$Trait, '_', results$Env)

if (ordered) {
if (ordered && select != 'MSEP') {
results$TxE <- with(results, reorder(TxE , Pearson, median, na.rm = T))
} else if (ordered && select == 'MSEP') {
results$TxE <- with(results, reorder(TxE , MSEP, median, na.rm = T))
}

boxplot(plot.y ~ results$TxE, col = "grey", ylab = ylab, ...)
}else{
boxplot(plot.y, col = "grey", xlab = 'Environment', ylab = ylab, ...)
boxplot(plot.y, col = "grey", ylab = ylab, ...)
}
}

Expand Down Expand Up @@ -367,12 +370,15 @@ boxplot.MTMECV <- function(x, select = 'Pearson', ordered = TRUE, ...){
if (length(unique(results$Env)) > 1) {
results$TxE <- paste0(results$Trait, '_', results$Env)

if (ordered) {
if (ordered && select != 'MSEP') {
results$TxE <- with(results, reorder(TxE , Pearson, median, na.rm = T))
} else if (ordered && select == 'MSEP') {
results$TxE <- with(results, reorder(TxE , MSEP, median, na.rm = T))
}

boxplot(plot.y ~ results$TxE, col = "grey", ylab = ylab, ...)
}else{
boxplot(plot.y, col = "grey", xlab = 'Environment', ylab = ylab, ...)
boxplot(plot.y, col = "grey", ylab = ylab, ...)
}
}

Expand Down

0 comments on commit 93cc1f8

Please sign in to comment.