Perfect! combn was the trick I needed. Although I'll probably rbind
the stuff instead of building a new frame. :)
On Thu, Dec 22, 2011 at 6:48 PM, Sarah Goslee sarah.gos...@gmail.com wrote:
I'm not at all sure what you mean with your matrix: is that supposed to
be three columns? What about:
On Fri, Dec 23, 2011 at 1:06 AM, Taral tar...@gmail.com wrote:
Perfect! combn was the trick I needed. Although I'll probably rbind
the stuff instead of building a new frame. :)
You should try rbind() with the small example I gave before you use it
on your data. You'll immediately see why I
I'd like to convert a dist into a table/matrix/thingy of the form:
A B value
A C value
B C value
(assuming the dist was over 3 names).
Is there a way to do this without using a for loop?
--
Taral tar...@gmail.com
Please let me know if there's any further trouble I can give you.
-- Unknown
I'm not at all sure what you mean with your matrix: is that supposed to
be three columns? What about:
fakedata - data.frame(X=runif(3), Y = runif(3))
rownames(fakedata) - c(A, B, C)
dist(fakedata)
A B
B 0.8617733
C 0.3813032 0.5124284
data.frame(t(combn(rownames(fakedata),
4 matches
Mail list logo