Learn R Programming

FactoClass (version 0.7.7)

FactoClass.tex: Table of Coordinates, Aids of Interpretation of the Principal Axes and Cluster Analysis in LaTeX format.

Description

The coordinates, aids of interpretation and results of cluster analysis of an object of class FactoClass are written in tables for edition in LaTeX format and written in a file.

Usage

FactoClass.tex(FC,job="",append=TRUE, dir = getwd(), p.clust = FALSE )

## S3 method for class 'FactoClass.tex':
print(x, \dots)

latexDF(obj, job="latex" ,tit="" ,lab="" ,append=TRUE ,dec=1,
                     dir = getwd() , to.print = TRUE )
roundDF(tabla,dec=1)

Arguments

FC
object of class FactoClass.
job
A name to identify the exit.
append
if is 'TRUE' the exit in LaTeX format is added to the file.
dir
name of the directory in which the file is kept.
p.clust
the value of this parameter is 'TRUE' or 'FALSE' to print or not the cluster of each element.
tabla
object of class 'data frame'.
dec
number of decimal.
x
object of class FactoClass.tex
obj
object of class data.frame.
tit
title of the table in LaTeX format.
lab
label of the table in LaTeX format.
to.print
if it is 'TRUE' the table is also printed in the console.
...

Value

  • object of class FactoClass.tex with the following characteristics:
  • tvalpeigenvalues * 1000.
  • c1eigenvectors.
  • cocoordinates of the columns.
  • col.abscontribution of each column to the inertia of the axis (percentage).
  • col.relquality of representation of each column (percentage).
  • col.cumquality of representation of each column accumulated in the subspace (percentage).
  • licoordinates of the rows.
  • row.abscontribution of each rows to the inertia of the axis (percentage).
  • row.relquality of representation of each rows (percentage).
  • row.cumquality of representation of each rows accumulated in the subspace (percentage).
  • indicestable of indices of level generated by the Ward cluster analysis.
  • cor.cluscoordinates of the center of gravity of each cluster.
  • clus.summsummary of the cluster.
  • carac.catecluster characterization by qualitative variables.
  • carac.contcluster characterization by quantitative variables.
  • clustervector indicating the cluster of each element.

Details

This function helps with the construction of tables in LaTeX format. Besides, it allows a easy reading of the generated results by FactoClass. The function latexDF is an entrance to xtable and turns an object of class data.frame a table in LaTeX format.

Examples

Run this code
data(BreedsDogs)

BD.act <- BreedsDogs[-7]  # active variables
BD.ilu <- BreedsDogs[7]   # illustrative variables

# MCA

FaCl <- FactoClass( BD.act, dudi.acm,
                    scanFC = FALSE, dfilu = BD.ilu, nfcl = 10, k.clust = 4 )

FactoClass.tex(FaCl,job="BreedsDogs1", append=TRUE)
FactoClass.tex(FaCl,job="BreedsDogs", append=TRUE , p.clust = TRUE)

Run the code above in your browser using DataLab