[R] frequency table?

Sarah Goslee sarah.goslee at gmail.com
Tue Dec 6 14:27:26 CET 2011


After that, you might consult the source code for distance() in ecodist.
That function was specifically written to make it easy for people to
add new dissimilarity/similarity metrics, and I think you'll find it helpful
(even if you just extract the bit you need rather than expand the whole
function).

Sarah

On Mon, Dec 5, 2011 at 9:40 PM, B77S <bps0002 at auburn.edu> wrote:
> Set,
>
> This is the same post as your "Similarity Matrix" post.
>
> I'm not trying to be a smart ass here, but ... ?Can you fit a square peg in
> a round hole?... yes, but it doesn't mean it belongs there.
>
> I suggest you get a piece of paper and a pencil and figure out 1) what you
> are trying to do and why, and 2) how you would do that by hand.  After you
> do that, you should be able to figure this out on your own or formulate a
> question to post that someone will be able to answer.  Reading might help as
> well.
>
>
>
> set wrote
>>
>> Hello R-users,
>>
>> I've got a file with individuals as colums and the clusters where they
>> occur in as rows. And I wanted a table which tells me how many times each
>> individual occurs with another. I don't really know how such a table is
>> called...it is not a frequency table....My eventual goal is to make
>> Venn-diagrams from the occurence of my individuals.
>>
>> So I've this:
>>
>> cluster   ind1 ind2 ind3 etc.
>> 1            0      1     2
>> 2            3       0    1
>> 3            1       1     1
>>
>> And I want to go to this:
>>             ind1      ind2      ind3
>> ind1      0          4            2
>> ind2      4          0            4
>> ind3      2           4           1
>>
>> is there a way to do this?
>> Thank you for your help
>>
-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list