Dear Annelise,
Within R, if you wish to merge matrices, you can use the commands rbind or
cbind. But if you are unfamiliar with R, you may wish to create you files
outside R and read them in.
If you have ade4 files you can convert them using ade4toR. But I normally
read in plain text files. You can read text files into R, using
read.table("data.txt", header=TRUE, row.names=1, sep="\t")
# This will open a tab delimited file (eg saved from excel)
read.csv("data.txt", header=TRUE, row.names=1)
# This will open a comma delimited file (eg saved from excel)
Many ADE4 programs like your data to be a data.frame, read.table and
read.csv automatically create a data.frame. However if you use scan, or read
your data as a matrix you'll need to convert it
scan("data.txt", what=123) # This will read in a file containing only
numbers
scan("data.txt", what="text") # This will read in a file containing only
text
# Using scan, the data will be read in as a vector, not a data matrix.
# To convert to a matrix use matrix()
matrix(scan("data.txt", what=123) , byrow=TRUE, ncol=10)
# Scan and convert to matrix of 10 columns
as.data.frame(matrix(scan("data.txt", what=123) , byrow=TRUE, ncol=10) )
# Same as above, but create data.frame
Hope this helps.
Best wishes
Aedin
-----Original Message-----
From: owner-adelist@biomserv.univ-lyon1.fr
[mailto:owner-adelist@biomserv.univ-lyon1.fr]On Behalf Of Anne-Lise Fleddum
Sent: 30 November 2004 17:15
To: adelist@biomserv.univ-lyon1.fr
Subject: ade4toR
Hello
Thank you for last time you help me with the metacard. But now I have change
to ade4 connect to R. Much better illustration and possibilities.
Can someone please help me with:
I want to run fuzzy correspondance analysis and coinert in R. But I can not
find
any commandoes for creating all this files into one files?
Can I use the same files I used in metacard and how do I transfer them into
R?
Thank you
Cheers Annelise
---------------------------------------------------------------
Annelise Fleddum
Avdeling for marinbiologi og limnologi
Biologisk institutt
Universitetet i Oslo
Pb 1066 Blindern
0316 Oslo, Norge
Tlf: +47 22854515
Faks: +47 22854438
Mobil: 91803878
E-mail: fleddum@bio.uio.no
http://www.biologi.uio.no
This archive was generated by hypermail 2b30 : Tue Nov 30 2004 - 18:56:29 MET