jmp-l
[Top] [All Lists]

Re: Need JMP formula to count occurrence of a particular

To: jmp-l@lists.biostat.wustl.edu
Subject: Re: Need JMP formula to count occurrence of a particular
From: Pam Davy <pjd@uow.edu.au>
Date: Fri, 22 Apr 2005 10:11:17 +1000
In-reply-to: <OFB781611C.FB569325-ON86256FEA.007D1549@northamerica.intra.abbott.com>
Organization: University of Wollongong
References: <OFB781611C.FB569325-ON86256FEA.007D1549@northamerica.intra.abbott.com>
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
The following Calculator Window formulae will count occurrences of "{" and "C1ccC1" respectively, assuming the strings to be stored in a column called "text". The second formula gives an answer of 2 for "aC1ccC1ccC1", so it would need modification if you only want to count non-overlapping occurrences.

Summation(i = 1, Length( :text), Substr( :text, i, 1) == "{")
Summation(i = 1, Length( :text) - 6, Substr( :text, i, 6) == "C1ccC1")


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