[R] Where is the construction of a dist object from raw data described?
Steven Lembark
lembark at wrkhors.com
Wed May 19 16:10:56 CEST 2010
Any reference to the appropriate documentation would
be most appreciated.
I am using the TSP module for clustering of HIV
genetic sequences. The distances have already been
computed and available as either upper-triangular
or square, i.e.:
a 1 2 3
b 4 5
c 6
d
or
a 0 1 2 3
b 1 0 4 5
c 2 4 0 6
d 3 5 6 0
The TSP modules takes in a "dist" object.
Catch: The only way I can see to get a dist
object is with dist(), which computes the
distances for itself rather than taking them
as-is.
Q: How does one convert either of the strucutres
above into a "dist" object without having to
first feed them through dist()?
I can easily split the labels into a seprate
output file, leaving me with the rownames
and colnames values for the result in a separate
place if that makes explaining how to get the
numeric values into a dist any easier.
Google, searching r-project.org, and the R
Nutshell book all lead me back to dist() or
daisy().
thanks
--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark at wrkhors.com +1 888 359 3508
More information about the R-help
mailing list