box.plot.wtd: weighted Boxplot

View source: R/box.plot.wtd.R

box.plot.wtdR Documentation

weighted Boxplot

Description

Draw a weighted Boxplot. (Beta Version)

Usage

box.plot.wtd(x, group=NULL, group2=NULL, w=NULL, data=NULL, vnames=NULL,
             main=NULL, xlab=NULL, ylab=NULL, ylim=NULL, yticks=NULL,
             col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL, pdigs=4, alpha=NULL,
             cex=1, cex.axis=1, lwd=2, h=NULL, lty=2,
             varwidth=TRUE, means=FALSE, count=TRUE, zylinder=FALSE,
             outlier=TRUE, wall=0, type='box')

Arguments

x
  • a numeric vector of values

  • a character string with the name of the variable in the data.frame

  • a formula x~group or x~group+group2

group
  • a factor to group the plots

  • a character string with the name of the group variable in the data.frame

group2
  • a second factor to group the plots

  • a character string with the name of the group2 variable in the data.frame

w

weights

data

a data.frame

vnames

a vector of character strings with the names of groups in the legend, it can be a list of two vectors if group2 is given

main

an overall title for the plot

xlab

a title for the x axis

ylab

a title for the y axis

ylim

the y limits (y1, y2) of the plot

yticks

the number of ticks on the y axis or a vector of exact ticks

col

color of objects (Boxes)

tcol

color of the text in whole plot

bgcol

the background color for plot dekoration

lcol

color for the lines in plot, a vector of colors is possible

pdigs

a number indicate how to round p-values.: see ?format.pval.ade

alpha

a parameter in [0, 1] for semi-transparency of objects (Boxes)

cex

a numeric character expansion factor for the points

cex.axis

a numeric character expansion factor for axis

lwd

the line width

h

the y-value(s) for horizontal line(s).

lty

the line type

varwidth

logical asking whether the boxwidth indicate the N

means

logical asking whether to draw points for the means

count
  • logical asking whether to shown N

  • a string to replace N with it, if you use "?" in you string in will be replaced with N.

  • a vector of strings to replace N with it, if you use "?" in you strings in will be replaced with N.

zylinder

logical asking whether to draw boxes in a zylinder style

outlier

logical asking whether to draw points for outlier

wall

a number between 0 and 6 for selection the dekoration style of the plot.

type

one of following:

  • "boxplot" for a normal boxplot

  • "sd" for mean and one sd interval

  • "2sd" for mean and one, two sd intervals

  • "iqr" for a IQR plot

Examples

x<-rnorm(1000)
g<-round(runif(1000))
w<-abs(rnorm(1000))
d<- data.frame(x, g, w)
box.plot.wtd('x', 'g', w='w', data=d)

epade documentation built on Oct. 29, 2022, 1:14 a.m.