s-news
[Top] [All Lists]

Re: count occurrences

To: "Ita.Cirovic-Donev@hypo-alpe-adria.com" <Ita.Cirovic-Donev@hypo-alpe-adria.com>
Subject: Re: count occurrences
From: "Sarah Goslee" <sarah.goslee@gmail.com>
Date: Mon, 20 Nov 2006 09:17:21 -0500
Cc: s-news@lists.biostat.wustl.edu
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=V1/JU9RcTBc0vlPdydhLLfKn0i7UEi4F3HKfWDntgHUAoLQjwE7UH2qLnF5bMYB8xPDpzxkgRmFkj14BxePk6x7/4Gx2k2OWyG4RV1OrppScmyhn0d4C07098k8fF6MRjXsAaQnaPW1p9UxnXRCxKMmbZBbXGSvBmLuhmbPmJE8=
In-reply-to: <OF37967DBD.A1CF9C2B-ONC125722C.004D11E7-C125722C.004DD87C@arz.co.at>
References: <OF37967DBD.A1CF9C2B-ONC125722C.004D11E7-C125722C.004DD87C@arz.co.at>
Same thing, pretty much

x <- c("A", "B", "C", "A", "C", "A", "A")
y <- c(1,1,1,0,0,0,0)

t0 <- table(x[y == 0])
t1 <- table([x[y == 1])

Sarah

On 11/20/06, Ita.Cirovic-Donev@hypo-alpe-adria.com
<Ita.Cirovic-Donev@hypo-alpe-adria.com> wrote:




Sorry, I have an addition to previous email. I also have a vector of zeros
and ones of equal length as the first vector. The counting should be done
in the following way:

      count each A where it is equal to zero
      count each A where it is equal to one
      and so on for the rest of the qualitative marks.

thanks




--
Sarah Goslee
http://www.functionaldiversity.org

<Prev in Thread] Current Thread [Next in Thread>