Maxime Pauwels
2009-Oct-15 15:34 UTC
[R] changing a matrix from class data.frame to class dist
Dear,
I have a data frame object (FSTc) which is in fact a matrix of class
data.frame but created from a txt file using the command
FSTc<-read.table("FSTcmatrix.txt", header=T)
I would like to transform it in a distance matrix of class dist to use
it with the ade4 package.
I'm quite sure this is a simple operation but i just don't have the
commands.
Could anyone help?
Thank you
Maxime
--
Maxime Pauwels
Researcher ID: http://www.researcherid.com/rid/A-1745-2009
Laboratoire de G?n?tique et Evolution des Populations V?g?tales
UMR CNRS 8016
Universit? de Lille, USTL-Lille1
http://gepv.univ-lille1.fr
Tel : +33 3 20 43 40 76
Fax : +33 3 20 43 69 79
?Impose ta chance, serre ton bonheur et va vers ton risque. A te regarder, ils
s?habitueront.?
Ren? Char
David Winsemius
2009-Oct-15 16:27 UTC
[R] changing a matrix from class data.frame to class dist
On Oct 15, 2009, at 11:34 AM, Maxime Pauwels wrote:> Dear, > > I have a data frame object (FSTc) which is in fact a matrix of class > data.frameNot sure that is possible (in R terminology anyway.). Dataframes are lists.> but created from a txt file using the command > FSTc<-read.table("FSTcmatrix.txt", header=T) > > I would like to transform it in a distance matrix of class dist to > use it with the ade4 package. > > I'm quite sure this is a simple operation but i just don't have the > commands.?dist #which points to ?as.dist # which is a coercion function -- David Winsemius, MD Heritage Laboratories West Hartford, CT
Possibly Parallel Threads
- netCDF, ncdf library
- Hosts leaving domain without reasons...
- Font problems (wrong font is used) (sorry for the delay Gerard!!)
- UNICAST_SUBNET
- Xen Security Advisory 59 (CVE-2013-3495) - Intel VT-d Interrupt Remapping engines can be evaded by native NMI interrupts