Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ktab

the class of objects 'ktab' (K-tables)


Description

an object of class ktab is a list of data frames with the same row.names in common.
a list of class 'ktab' contains moreover :

blo

: the vector of the numbers of columns for each table

lw

: the vector of the row weightings in common for all tables

cw

: the vector of the column weightings

TL

: a data frame of two components to manage the parameter positions associated with the rows of tables

TC

: a data frame of two components to manage the parameter positions associated with the columns of tables

T4

: a data frame of two components to manage the parameter positions of 4 components associated to an array

Usage

## S3 method for class 'ktab'
c(...)
## S3 method for class 'ktab'
x[i,j,k]
is.ktab(x)
## S3 method for class 'ktab'
t(x)
## S3 method for class 'ktab'
row.names(x)
## S3 method for class 'ktab'
col.names(x)
tab.names(x)
col.names(x)
ktab.util.names(x)

Arguments

x

an object of the class ktab

...

a sequence of objects of the class ktab

i,j,k

elements to extract (integer or empty): index of tables (i), rows (j) and columns (k)

Details

A 'ktab' object can be created with :
a list of data frame : ktab.list.df
a list of dudi objects : ktab.list.dudi
a data.frame : ktab.data.frame
an object within : ktab.within
a couple of ktabs : ktab.match2ktabs

Value

c.ktab returns an object ktab. It concatenates K-tables with the same rows in common.
t.ktab returns an object ktab. It permutes each data frame into a K-tables. All tables have the same column names and the same column weightings (a data cube).
"[" returns an object ktab. It allows to select some arrays in a K-tables.
is.ktab returns TRUE if x is a K-tables.
row.names returns the vector of the row names common with all the tables of a K-tables and allowes to modifie them.
col.names returns the vector of the column names of a K-tables and allowes to modifie them.
tab.names returns the vector of the array names of a K-tables and allowes to modifie them.
ktab.util.names is a useful function.

Author(s)

Daniel Chessel
Anne-Béatrice Dufour anne-beatrice.dufour@univ-lyon1.fr Stéphane Dray stephane.dray@univ-lyon1.fr

Examples

data(friday87)
wfri <- data.frame(scale(friday87$fau, scal = FALSE))
wfri <- ktab.data.frame(wfri, friday87$fau.blo)
wfri[2:4, 1:5, 1:3]
c(wfri[2:4], wfri[5])

data(meaudret)
wit1 <- withinpca(meaudret$env, meaudret$design$season, scan = FALSE, 
    scal = "partial")
kta1 <- ktab.within(wit1, colnames = rep(c("S1","S2","S3","S4","S5"), 4))
kta2 <- t(kta1)

if(adegraphicsLoaded()) {
  kplot(sepan(kta2), row.plab.cex = 1.5, col.plab.cex = 0.75)
} else {
  kplot(sepan(kta2), clab.r = 1.5, clab.c = 0.75)
}

ade4

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

v1.7-16
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr>, Anne-Béatrice Dufour <anne-beatrice.dufour@univ-lyon1.fr>, and Jean Thioulouse <jean.thioulouse@univ-lyon1.fr>, with contributions from Thibaut Jombart, Sandrine Pavoine, Jean R. Lobry, Sébastien Ollier, Daniel Borcard, Pierre Legendre, Stéphanie Bougeard and Aurélie Siberchicot. Based on earlier work by Daniel Chessel.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.