Description Usage Arguments Value Examples
mixPlotYield takes as input a data.frame object (dfData
), four character strings indicating the column names from dfData
to be used respectively as the y-variable, the x-variable, the first legend, the second legend for the plot. The legend variables are used to color-code the fill and the boundary of the data points in the plot. Other inputs include a character string for the overall title of the plot (main
), a character string indicating the name of the output subdirectory (subDir
), three positive numbers indicating the width (width
), height (height
) and resolution (res
) of the output plot. It returns a plot of the yield as a function of the organic matter from the data points using varYield
and varX
as the y and the x variables respectively. The plot is saved as a .png file in the subDir
subdirectory within the directory "plot" inside the current working directory. A "plot" directory is created in the current working directory if not present already. Similarly, if subDir
is specified, a subdirectory with the name subDir
is created within plot/ if not already present, and the plot is saved in that subdirectory. If a subdirectory is not specified (i.e. missing subDir
), then the plot is saved in plot/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | mixPlotYield(
dfData,
varYield = "yield",
varX,
varTreat,
varIndex,
ylab = expression(Yield ~ (Mg ~ ha^-1)),
...,
legend.controlTreat = NULL,
legend.controlInd = NULL,
subDir,
width = 2400,
height = 1100,
res = 160
)
|
dfData |
a data.frame object. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" "). |
varYield |
a character string indicating the name of the column from the data.frame object |
varX |
a character string indicating the name of the column from the data.frame object |
varTreat |
a character string indicating the name of the column from the data.frame object |
varIndex |
a character string indicating the name of the column from the data.frame object |
ylab |
a character string indicating a label for the y-axis. |
legend.controlTreat |
a list comprising of legend values and titles for the first legend. (Refer to the examples) |
legend.controlInd |
a list comprising of legend values and titles for the second legend. (Refer to the examples) |
subDir |
a character string indicating the name of the subdirectory within the "plot" directory to save the output data.frame object (as a .txt file) and plot (as a .png file)respectively. If a subdirectory with the given name does not exist within output and/or plot, then it is created. If not specified, the outputs are stored in output/ and plot/. |
width |
a number (default: 2400) indicating the width of the output plot. |
height |
a number (default: 1100) indicating the height of the output plot. |
res |
a number (default: 160) indicating the resolution of the output plot. |
main |
a character string indicating an overall title for the plot. |
mixPlotYield returns a plot of the yeild as a function of the organic matter using varYield
as the yield variable and varX
as the x-variable from the data.frame object dfData
with the fill and the boundary color-coded using and columns from dfData
. It saves the plot as a .png file in the subDir
subdirectory within the directory "plot" inside the current working directory. It creates a "plot" directory in the current working directory if not present already. Similarly, if subDir
is specified, it creates a subdirectory with the name subDir
within plot/ if not already present, and saves the plot inside the subdirectory. If a subdirectory is not specified (i.e. missing subDir
), then it saves the plot in plot/.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.