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

ktab.data.frame

Creation of K-tables from a data frame


Description

creates K tables from a data frame.

Usage

ktab.data.frame(df, blocks, rownames = NULL, colnames = NULL, 
    tabnames = NULL, w.row = rep(1, nrow(df)) / nrow(df), 
    w.col = rep(1, ncol(df)))

Arguments

df

a data frame

blocks

an integer vector for which the sum must be the number of variables of df. Its length is the number of arrays of the K-tables

rownames

the row names of the K-tables (otherwise the row names of df)

colnames

the column names of the K-tables (otherwise the column names of df)

tabnames

the names of the arrays of the K-tables (otherwise "Ana1", "Ana2", ...)

w.row

a vector of the row weightings

w.col

a vector of the column weightings

Value

returns a list of class ktab. See ktab.

Author(s)

Daniel Chessel
Anne-Béatrice Dufour anne-beatrice.dufour@univ-lyon1.fr

Examples

data(escopage)
wescopage <- data.frame(scalewt(escopage$tab))
wescopage <- ktab.data.frame(wescopage, escopage$blo,
        tabnames = escopage$tab.names)
plot(sepan(wescopage))
data(friday87)
w <- data.frame(scale(friday87$fau, scal = FALSE))
w <- ktab.data.frame(w, friday87$fau.blo, tabnames = friday87$tab.names)
kplot(sepan(w))

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.