Learn R Programming

ade4 (version 1.2-2)

ade4toR: Format Change Utility

Description

Exchange objects between R and ADE4 (classic version) http://pbil.univ-lyon1.fr/ADE-4

Usage

ade4toR (fictab, ficcolnames = NULL, ficrownames = NULL)
Rtoade4 (x)

Arguments

fictab
a name of ADE4 text file. A data frame with the same name is created in the R environment.
ficcolnames
the column names label file
ficrownames
the row names label file
x
a data frame

Value

  • 'ade4toR' gives data frames. 'Rtoade4' gives text files.

Details

"xxx" is the name of object x ((deparse(substitute(x)))) For any table : creates a file "xxx.txt" creates a file "xxx_row_lab.txt" with row names creates a file "xxx_col_lab.txt" with column names if x has the 'col.blocks' attribute creates a file "xxx_col_bloc_lab.txt" with blocks names creates a file "xxx_col_bloc.txt" with blocks sizes For a table which all columns are factors : creates a file "xxx.txt" creates a file "xxx_var_lab.txt" with row names creates a file "xxx_moda_lab.txt" with categories names Files are created in the current working directory.

Examples

Run this code
data(tarentaise)
traits <- tarentaise$traits
Rtoade4(traits)
# File creation traits.txt 
# File creation traits_col_lab.txt 
# File creation traits_row_lab.txt 
# File creation traits_col_bloc.txt 
# File creation traits_col_bloc_lab.txt  

mil <- tarentaise$envir
Rtoade4(mil)
#File creation mil.txt 
#File creation mil_var_lab.txt 
#File creation mil_moda_lab.txt

Run the code above in your browser using DataLab