View source: R/chart_amBoxplot.R
amBoxplot | R Documentation |
amBoxplot computes a boxplot of the given data values. Can be a vector, a data.frame, or a matrix.
amBoxplot(object, ...) ## Default S3 method: amBoxplot( object, xlab = NULL, ylab = NULL, ylim = NULL, names = NULL, col = "#1e90ff", horiz = FALSE, ... ) ## S3 method for class 'data.frame' amBoxplot( object, id = NULL, xlab = NULL, ylab = NULL, ylim = NULL, col = NULL, horiz = FALSE, ... ) ## S3 method for class 'matrix' amBoxplot( object, use.cols = TRUE, xlab = NULL, ylab = NULL, ylim = NULL, col = NULL, horiz = FALSE, ... ) ## S3 method for class 'formula' amBoxplot( object, data = NULL, id = NULL, xlab = NULL, ylab = NULL, ylim = NULL, col = NULL, horiz = FALSE, ... )
object |
a vector, data.frame, a matrix, or a formula. |
... |
see amOptions for more options. |
xlab, ylab |
|
ylim |
|
names |
|
col |
|
horiz |
|
id |
|
use.cols |
|
data |
|
An object of class AmChart.
See online documentation https://datastorm-open.github.io/introduction_ramcharts/ and amChartsAPI
amOptions, amBarplot, amBoxplot, amHist, amPie, amPlot, amTimeSeries, amStockMultiSet, amBullet, amRadar, amWind, amFunnel, amAngularGauge, amSolidGauge, amMekko, amCandlestick, amFloatingBar, amOHLC, amWaterfall
## Not run: # 'numeric' (default) amBoxplot(rnorm(100)) # 'formula' amBoxplot(count ~ spray, data = InsectSprays) # 'formula', two group data <- InsectSprays data$group <- c("H", "F") amBoxplot(count ~ spray + group, data = data, col = c("purple", "darkblue")) # 'matrix' x <- matrix(nrow = 10, ncol = 5, rnorm(50)) amBoxplot(x) # 'data.frame' amBoxplot(iris[, 1:4]) ## End(Not run) # Other examples available which can be time consuming depending on your configuration. ## Not run: don <- data.frame(a = 1:10, b = 1:5) amBoxplot(don, ylim = c(0,15)) ## End(Not run) ## Not run: # --- matrix x <- matrix(nrow = 10, ncol = 5, rnorm(50)) amBoxplot(x) # on columns colnames(x) <- LETTERS[1:5] amBoxplot(x) # with names amBoxplot(x, use.cols = FALSE, col = c("blue", "red")) # Parameter for amOptions amBoxplot(x, export = TRUE, exportFormat = "SVG") ## End(Not run) ## Not run: # --- Formula (obj <- amBoxplot(count ~ spray, data = InsectSprays)) # Adding parameters amBoxplot(count ~ spray, data = InsectSprays, ylim = c(0,50), xlab = "spray", col = c("darkblue", "gray")) # Transpose amBoxplot(count ~ spray, data = InsectSprays, ylim = c(0,50), xlab = "spray", horiz = FALSE) # Using a custom colum to identify outliers InsectSprays$id <- paste0("ID : ", 1:nrow(InsectSprays)) amBoxplot(count ~ spray, data = InsectSprays, id = "id") # Parameter for amOptions amBoxplot(count ~ spray, data = InsectSprays, main = "amcharts") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.