spread | R Documentation |
Function constructs the plots depending on the types of variables in the provided matrix / data frame.
spread(data, histograms = FALSE, log = FALSE, lowess = FALSE, ...)
data |
Either matrix or data frame with the data. |
histograms |
If |
log |
If |
lowess |
If |
... |
Other parameters passed to the plot function. Currently only "main" parameter is accepted. |
If both variables are in metric scale, then the classical scatterplot is constructed. If one of them is either integer (up to 10 values) or categorical (aka 'factor'), then boxplots (with grey dots corresponding to mean values) are constructed. Finally, for the two categorical variables the tableplot is returned (see tableplot function for the details). All of this is packed in a matrix.
See details in the vignette "Marketing analytics with greybox":
vignette("maUsingGreybox","greybox")
Function does not return anything. It just plots things.
Ivan Svetunkov, ivan@svetunkov.com
plot, table, tableplot
### Simple example
spread(mtcars)
spread(mtcars,log=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.