Learn R Programming

FactoClass (version 1.2.9)

plotct: Row and Column Profiles of a Contingency Table

Description

It plots barplot profiles of rows or columns from a contingency table including marginal profiles

Usage

plotct(x,profiles="both",legend.text=TRUE,tables=FALSE,nd=1,... )

Value

if tables=TRUE, object of class list with the following:

ct

contingengy table with row and column marginals

perR

row profile with marginal, in percent

perC

column profile with marginal, in percent

Arguments

x

contingency table

profiles

select profiles: "both" file and column profiles in two graph devices, "row" only row profiles, "col" only column profiles

legend.text

if it is TRUE a box with legends is included at the right

tables

logical, if TRUE tables with marginals are returned

nd

number of decimals to profiles as percentages

...

further arguments passed to or from other methods

Author

Camilo Jose Torres cjtorresj@unal.edu.co , Campo Elias Pardo cepardot@unal.edu.co

Details

Plot row profiles in horizontal form and columns profiles in vertical form

Examples

Run this code
mycolors<-colors()[c(1,26,32,37,52,57,68,73,74,81,82,84,88,100)]
data(Bogota)
plotct(Bogota[,2:7],col=mycolors)
# return tables with marginals
tabs <- plotct(Bogota[,2:7],col=mycolors,tables=TRUE,nd=0)

Run the code above in your browser using DataLab