crosschart: A cross chart

Description Usage Arguments Value Author(s) References Examples

View source: R/crosschart.R

Description

A cross chart displays for each observation a smal cross above the associated modality

Usage

1
crosschart(x, my.title, col,family="Courier")

Arguments

x

qualitative variable

my.title

character. title of the plot

col

vector of characters for the color of each modality

family

font family for the title. Default is "Courier". Another choice can be, e.g., "HersheyScript"

Value

A cross chart

Author(s)

Lafaye de Micheaux Pierre <lafaye@unsw.edu.au>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <b.liquet@uq.edu.au>

References

Chapter 11 (Descriptive Statistics) from the book: The R Software, Fundamentals of Programming and Statistical Analysis

Examples

1
2
3
4
5
6
data(NUTRIELDERLY)
attach(NUTRIELDERLY)
situation <- as.factor(situation)
levels(situation) <- c("single","couple","family","other")
crosschart(situation,col=c("orange","darkgreen","black","tan"))
detach(NUTRIELDERLY)

Example output

Loading required package: xtable
Loading required package: RColorBrewer
Loading required package: gdata
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

Loading required package: IndependenceTests

TRSbook documentation built on May 2, 2019, 2:45 a.m.

Related to crosschart in TRSbook...