cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-540284%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EComment%20g%C3%A9n%C3%A9rer%20une%20colonne%20de%20num%C3%A9rotation%20qui%20se%20r%C3%A9initialise%20en%20fonction%20d'autres%20valeurs%20de%20colonne%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-540284%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESalut%20tout%20le%20monde%2C%3C%2FP%3E%3CP%3EJ'essaie%20de%20g%C3%A9n%C3%A9rer%20une%20colonne%20qui%20comptera%20les%20quadrats%20(zone%20d'%C3%A9chantillonnage%20unique)%20pour%20un%20site%20donn%C3%A9%20%C3%A0%20une%20date%20particuli%C3%A8re.%20J'ai%20une%20colonne%20Site%20Code%20et%20une%20colonne%20Date%2C%20ainsi%20que%20des%20colonnes%20Latitude%20et%20Longitude%2C%20o%C3%B9%20un%20changement%20de%20latitude%20et%2Fou%20de%20longitude%20%C3%A9quivaut%20%C3%A0%20un%20nouveau%20quadrat%20pour%20ce%20site.%20Dans%20chaque%20quadrat%2C%20toutes%20les%20esp%C3%A8ces%20ont%20%C3%A9t%C3%A9%20%C3%A9chantillonn%C3%A9es%2C%20ce%20qui%20signifie%20que%20chaque%20ligne%20avec%20le%20m%C3%AAme%20site%2C%20la%20m%C3%AAme%20date%2C%20la%20latitude%20et%20la%20longitude%20a%20un%20nouveau%20code%20d'esp%C3%A8ce.%20J'ai%20pu%20cr%C3%A9er%20une%20colonne%20de%20classement%20qui%20se%20r%C3%A9initialise%20lorsque%20ces%20quatre%20colonnes%20changent%20(c'est-%C3%A0-dire%20le%20code%20du%20site%2C%20la%20date%2C%20la%20latitude%20et%20la%20longitude)%2C%20ce%20qui%20me%20donne%20un%20d%C3%A9compte%20du%20nombre%20d'esp%C3%A8ces%20trouv%C3%A9es%20dans%20chaque%20quadrat.%20Existe-t-il%20un%20moyen%20d'utiliser%20l'une%20de%20ces%20colonnes%20pour%20num%C3%A9roter%20automatiquement%20lorsqu'un%20quadrat%20change%20(entier%20commen%C3%A7ant%20%C3%A0%201%20et%20augmentant%20de%201)%20dans%20un%20site%20et%20r%C3%A9initialise%20la%20num%C3%A9rotation%20lorsque%20le%20site%20et%2Fou%20la%20date%20change.%20J'ai%20joint%20un%20exemple%20de%20fichier%20avec%20un%20sous-ensemble%20de%20mes%20donn%C3%A9es%20et%20une%20colonne%20appel%C3%A9e%20Quadrat%20que%20j'ai%20remplie%20manuellement%20avec%20ce%20que%20j'essaie%20de%20r%C3%A9aliser.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Quadrat%20Screenshot.jpg%22%20style%3D%22width%3A%20922px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F45165i54E109317F67EF6D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Quadrat%20Screenshot.jpg%22%20alt%3D%22Quadrat%20Screenshot.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJ'utilise%20JMP%20version%2016.2.0.%3CSPAN%3EMerci%20beaucoup%20d'avance%20pour%20votre%20aide%20!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-540284%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3ETableau%20de%20donn%C3%A9es%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-540331%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%26nbsp%3B%3A%20Comment%20g%C3%A9n%C3%A9rer%20une%20colonne%20de%20num%C3%A9rotation%20qui%20se%20r%C3%A9initialise%20en%20fonction%20d'autres%20valeurs%20de%20colonne%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-540331%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EJe%20pense%20que%20tu%20pourrais%20utiliser%20quelque%20chose%20comme%20%C3%A7a%20%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ECol%20Cumulative%20Sum(If(Row()%20%3D%3D%20Col%20Min(Row()%2C%20%3ADate%2C%20%3ALatitude%2C%20%3ALongitude)%2C%201%2C%200)%2C%20%3AWetland%20Code)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1662226676297.png%22%20style%3D%22width%3A%20380px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F45166i879FA0060CE699D1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_0-1662226676297.png%22%20alt%3D%22jthi_0-1662226676297.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-540334%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%26nbsp%3B%3A%20Comment%20g%C3%A9n%C3%A9rer%20une%20colonne%20de%20num%C3%A9rotation%20qui%20se%20r%C3%A9initialise%20en%20fonction%20d'autres%20valeurs%20de%20colonne%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-540334%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESalut%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%20%40jthi%3C%2FA%3E%20!%20C'est%20%C3%A0%20peu%20pr%C3%A8s%20ce%20que%20je%20voulais%2C%20merci%20beaucoup%20!%20J'ai%20juste%20d%C3%BB%20cr%C3%A9er%20une%20colonne%20de%20concat%C3%A9nation%20avec%20le%20code%20de%20zone%20humide%20et%20la%20date%20(appel%C3%A9e%20code%20d'%C3%A9chantillonnage)%20pour%20d%C3%A9tecter%20le%20changement%20de%20site%20ou%20de%20date%2C%20mais%20l'autre%20variable%20est%20rest%C3%A9e%20la%20m%C3%AAme%20et%20cela%20a%20fonctionn%C3%A9%26nbsp%3B!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ECol%20Cumulative%20Sum(%20If(%20Row()%20%3D%3D%20Col%20Min(%20Row()%2C%20%3CSPAN%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3E%3ADate%2C%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3ALatitude%2C%20%3ALongitude%20)%2C%201%2C%200%20)%2C%20%3ASampling%20Code%20)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMerci%20beaucoup%20encore%20pour%20l'aide%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Acara_con_una_leve_sonrisa%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
WetlandWoman
Level II

How do I generate a numbering column that resets based on other column values?

Hi everyone,

I am trying to generate a column that will count the quadrats (single sample area) for a given site on a particular date. I have a Site Code column and a Date column, as well as Latitude and Longitude columns, where a change in latitude and/or longitude equals a new quadrat for that site. Within each quadrat all species were sampled, meaning each row with the same site, date, latitude and longitude has a new species code. I have been able to create a rank column that resets when these four columns change (i.e. site code, date, latitude and longitude) which gives me a count of the number of species that were found at each quadrat. Is there a way to use any of these columns to auto-number when a quadrat changes (integer starting at 1 and increasing by 1) in a site and resets the numbering when the site and/or date changes. I have attached an example file with a subset of my data, and a column called Quadrat that I manually populated with what I am trying to achieve.

 

Quadrat Screenshot.jpg

 

I am using JMP version 16.2.0. Thank you so much in advance for your help!

2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: How do I generate a numbering column that resets based on other column values?

I think you could use something like this:

Col Cumulative Sum(If(Row() == Col Min(Row(), :Date, :Latitude, :Longitude), 1, 0), :Wetland Code)

jthi_0-1662226676297.png

 

-Jarmo

View solution in original post

WetlandWoman
Level II

Re: How do I generate a numbering column that resets based on other column values?

Hi @jthi! This is very nearly what I wanted, thank you so much! I just had to create a concatenate column with Wetland Code and Date (called Sampling Code) to pick up when the site or date changed but the other variable stayed the same and it worked!

 

Col Cumulative Sum( If( Row() == Col Min( Row(), :Date, :Latitude, :Longitude ), 1, 0 ), :Sampling Code )

Thanks so much again for the help

View solution in original post

2 REPLIES 2
jthi
Super User

Re: How do I generate a numbering column that resets based on other column values?

I think you could use something like this:

Col Cumulative Sum(If(Row() == Col Min(Row(), :Date, :Latitude, :Longitude), 1, 0), :Wetland Code)

jthi_0-1662226676297.png

 

-Jarmo
WetlandWoman
Level II

Re: How do I generate a numbering column that resets based on other column values?

Hi @jthi! This is very nearly what I wanted, thank you so much! I just had to create a concatenate column with Wetland Code and Date (called Sampling Code) to pick up when the site or date changed but the other variable stayed the same and it worked!

 

Col Cumulative Sum( If( Row() == Col Min( Row(), :Date, :Latitude, :Longitude ), 1, 0 ), :Sampling Code )

Thanks so much again for the help