On Fri, Dec 23, 2011 at 1:06 AM, Taral 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 didn't. :)
> On Th
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 wrote:
> I'm not at all sure what you mean with your matrix: is that supposed to
> be three columns? What about:
>
>> fakedata <- data.fr
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(f
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
"Please let me know if there's any further trouble I can give you."
-- Unknown
_
4 matches
Mail list logo