Closed awkena closed 4 years ago
Hi @awkena , I've taken a look at your plot bellow and I'm not sure about what you say with "mislabeling of the ENV and GEN factors". blue marks should be environments and green genotypes? If yes, please, double-check your code and see if genotypes and environments were informed in the correct arguments.
If you want ENV and GEN instead of Env and Gen, use leg.lab = c("GEN", "ENV")
, see bellow
library(metan)
#> Registered S3 method overwritten by 'GGally':
#> method from
#> +.gg ggplot2
#> []=====================================================[]
#> [] Multi-Environment Trial Analysis (metan) v1.5.0 []
#> [] Author: Tiago Olivoto []
#> [] Type citation('metan') to know how to cite metan []
#> [] Type vignette('metan_start') for a short tutorial []
#> [] Visit http://bit.ly/2TIq6JE for a complete tutorial []
#> []=====================================================[]
mod <- gge(data_ge, ENV, GEN, GY)
plot(mod,
type = 3,
leg.lab = c("GEN", "ENV"))
Created on 2020-04-22 by the reprex package (v0.3.0)
Since there is no clear error or bug, I'm closing this issue now. Please, feel free to comment here or send me an email if future questions arose. Olivoto
@TiagoOlivoto You could see from my plot that the GEN are plotted with a GREEN color and the ENV with a BLUE color. However, the legend says otherwise -- In the legend, GEN have been mislabeled with a BLUE color instead of a GREEN color, whereas ENV have been mislabeled with a GREEN color instead of BLUE color.
@awkena, If you look to my example, you'll see that genotypes and environments are labeled correctly. It seems likely you informed the column of genotypes of you data in the env
argument and the column of environments of your data I the gen
argument of gge()
soy_dat.xlsx @TiagoOlivoto I have attached my data for your attention. I arranged my columns in the same order as the data_ge data set, and used the same codes as used in the tutorial.
This was the code I used: gge_model <- gge(soy, ENV, GEN, GY, svp = "symmetrical", scaling = 1) e <- plot(gge_model, type = 3)
Dear @awkena , thank you for sending your data. I just encountered a very simple but embarrassing bug when plotting type = 3
. In your specific case, this mislabeling occurred because there has been exactly one (and only one) genotype into each polygon region. I've just uploaded a fix to this bug in the development version. Please, install metan again with devtools::install_github("TiagoOlivoto/metan")
. You can see the example with the corrected code bellow.
I hope this help you.
Regards
library(metan)
#> Registered S3 method overwritten by 'GGally':
#> method from
#> +.gg ggplot2
#> []=====================================================[]
#> [] Multi-Environment Trial Analysis (metan) v1.5.1 []
#> [] Author: Tiago Olivoto []
#> [] Type citation('metan') to know how to cite metan []
#> [] Type vignette('metan_start') for a short tutorial []
#> [] Visit http://bit.ly/2TIq6JE for a complete tutorial []
#> []=====================================================[]
library(readxl)
soy_dat <- read_excel("D:/Desktop/soy_dat.xlsx")
gge_model <- gge(soy_dat, ENV, GEN, GY, svp = "symmetrical", scaling = 1)
plot(gge_model, type = 3)
Created on 2020-04-23 by the reprex package (v0.3.0)
@TiagoOlivoto Thanks so much. I have installed the new version and run the analysis again. Everything looks great now.
have you an issue?
Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on https://stackoverflow.com/ or https://community.rstudio.com/.
Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.
using my own data set, I noticed a mislabeling of the ENV and GEN factors in the legend of the Which Won Where Biplot.