Plots of categorical variables

Share:

Description

This function allows to obtain barplots either sorted by frequency or by alphabetical order. The percentage of missing values is indicated at the top of the graphical device.

Usage

1
ENbarplot(dataset,X,spl=FALSE,numr=NULL,numc=NULL,report=FALSE)

Arguments

dataset

a data frame

X

the numbers of the variables to be plotted

spl

if TRUE, the barplots will be sorted per length

numr

the number of plots per row (by default 2)

numc

the number of plots per column (by default 2)

report

a logical value. If TRUE, a report is automatically generated

Details

The colour changes depending on the number of individuals of the category. If report=TRUE, a directory named "EnQuireR" is created in your working directory (which can be known thanks to the getwd() function). This directory contains the final pdf report and also the teX file used to produce it.

Author(s)

Sebastien Le sebastien.le@agrocampus-ouest.fr
Jerome Bouche jerome.bouche@yahoo.fr
Marine Cadoret marine.cadoret@agrocampus-ouest.fr
Gwenaelle Fournier gwenaelle.fournier@gmail.com
Olivier Fournier olivier.fournier76@gmail.com
Francois Le Poder francois.lepoder@gmail.com

See Also

XvsYbarplot which gives barplots of a categorical variable depending on the categoricals of another categorical variable.

Examples

1
2
3
4
5
6
7
## Not run: 
data(tea)
ENbarplot(tea,c(18,20,21,23))

ENbarplot(tea,c(18,20,21,23),report=TRUE)

## End(Not run)