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: Bassam A Dahman/HSC/VCU <bdahman@vcu.edu>
Date: Thu, 21 Apr 2005 23:45:44 -0400
Cc: jmp-l@lists.biostat.wustl.edu
Importance: Normal
you could use this code to get the counts without the overlap:
 
Summation(i = 1, Length( :text)-5, Substr( :text, i, 6) == "text") - Summation(i = 1, Length( :text)-9, Substr( :text, i, 10) == "C1ccC1ccC1")
 
Bassam Dahman

 

-----jmp-l-owner@lists.biostat.wustl.edu wrote: -----

To: jmp-l@lists.biostat.wustl.edu
From: Pam Davy <pjd@uow.edu.au>
Sent by: jmp-l-owner@lists.biostat.wustl.edu
Date: 04/21/2005 10:28PM
Subject: Re: [jmp-l] Need JMP formula to count occurrence of a particular

Sorry, there was a minor bug in my second formula for counting substring
occurrences!
The correct versions are

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

Pam Davy
<br designtimesp=17707
<Prev in Thread] Current Thread [Next in Thread>