bar_plot1 | R Documentation |
bar_plot1()
creates a bar plot for the new index (rYWAASB
for individuals) for simultaneous selection of genotypes by
trait and WAASB index using ggplot2.
bar_plot1(datap, lowt = FALSE)
datap |
The data set |
lowt |
A parameter indicating whether lower rates of the trait is preferred or not. For grain yield e.g. Upper values is preferred. For plant height lower values e.g. is preferred. |
Returns an object of class gg, ggmatrix
.
Ali Arminian abeyran@gmail.com
H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.
# Case 1: Higher trait values are preferred. For instance grain yield
# in cereals is a trait which its higher values are preferred and ranking
# is performed from the higher to lower values i.e. 1st, 2nd, 3rd etc
# in maize dataset.
data(maize)
bar_plot1(maize) # or: bar_plot1(maize, lowt = FALSE)
# Case 2: In this case, the lower values of the given trait are preferred.
# For instance days to maturity (dm) and plant height are traits where their
# lower values are preferred.
data(dm)
bar_plot1(dm, lowt = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.