cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-810200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFormule%20permettant%20de%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJMP%20pour%20Mac%3C%2FP%3E%3CP%3EVersion%2017.2.0%20(701896)%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJ'ai%20une%20colonne%20%C2%AB%26nbsp%3BDonn%C3%A9es%26nbsp%3B%C2%BB%20avec%20des%20lignes%20de%20nombre_nombre%20comme%20ceci%26nbsp%3B%3A%3C%2FP%3E%3CP%3E1_3%3C%2FP%3E%3CP%3E3_7%3C%2FP%3E%3CP%3E6_5%3C%2FP%3E%3CP%3E...%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJe%20souhaite%20tester%20cette%20colonne%20pour%20voir%20si%20certaines%20lignes%20contiennent%20des%20valeurs%20provenant%20d'une%20liste%20de%20valeurs%2C%20puis%20marquer%20ou%20%C3%A9tiqueter%20les%20lignes%20qui%20le%20font.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJe%20sais%20que%20je%20pourrais%20construire%20une%20formule%20%C3%A9labor%C3%A9e%20comme%20celle-ci%20%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20%3ADie%20X_Y%20%3D%3D%20%223_9%22%20%7C%20%3ADie%20X_Y%20%3D%3D%20%223_4%22%2C%0A%091%2C%0A%090%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMais%20c'est%20tr%C3%A8s%20laborieux%20pour%20de%20longues%20listes%20de%20valeurs%20diff%C3%A9rentes%20%C3%A0%20v%C3%A9rifier.%20J'aimerais%20simplement%20pouvoir%20coller%20une%20liste%20de%20valeurs%20%C3%A0%20v%C3%A9rifier%20dans%20une%20formule%2C%20d%C3%A9limit%C3%A9e%20par%20un%20espace%20ou%20une%20virgule.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJ'ai%20trouv%C3%A9%20la%20fonction%20%C2%AB%20%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.2%2Findex.shtml%23page%2Fjmp%2Fcharacter-functions-2.shtml%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EContient%20un%20%C3%A9l%C3%A9ment%3C%2FA%3E%20%C2%BB.%20Elle%20fonctionne%20bien%20pour%20un%20%C3%A9l%C3%A9ment%2C%20mais%20l'entr%C3%A9e%20d'aide%20n'offre%20aucune%20indication%20sur%20la%20mani%C3%A8re%20de%20construire%20l'option%20%C2%AB%20liste%20%C2%BB.%20J'ai%20essay%C3%A9%20ceci%20(en%20sp%C3%A9cifiant%20le%20d%C3%A9limiteur%20facultatif%20comme%20un%20espace)%20%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20Contains%20Item(%20%3ADie%20X_Y%2C%20%223_4%203_9%22%2C%20%22%20%22%20)%2C%0A%09%22exclude%22%2C%0A%09%22not%20exclude%22%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eet%20ceci%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%20Contains%20Item(%20%3AData%2C%20%223_4%2C3_9%22%2C%20%22%2C%22%20)%2C%0A%09%22exclude%22%2C%0A%09%22not%20exclude%22%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EJe%20comprends%20que%20le%20d%C3%A9limiteur%20par%20d%C3%A9faut%20est%20une%20virgule%2C%20mais%20je%20voulais%20l'appliquer%20pour%20trouver%20quelque%20chose%20qui%20fonctionne.%20Aucune%20des%20fonctions%20Contains%20Item%20ne%20renvoie%20le%20comportement%20recherch%C3%A9%20(1%20logique%20s'il%20y%20a%20une%20correspondance%2C%200%20sinon).%20S'il%20existe%20une%20meilleure%20fonction%20%C3%A0%20utiliser%2C%20veuillez%20nous%20en%20informer.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EIl%20s%E2%80%99agit%20d%E2%80%99un%20probl%C3%A8me%20g%C3%A9n%C3%A9ralis%C3%A9%20que%20j%E2%80%99aimerais%20pouvoir%20r%C3%A9soudre%20%3A%20inspecter%20une%20colonne%20pour%20trouver%20des%20correspondances%20avec%20de%20longues%20listes%20d%E2%80%99%C3%A9l%C3%A9ments.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EMerci%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-810200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomatisation%20et%20scripts%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EmacOS%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%0A%20%0A%20%0A%20%20%3CLINGO-SUB%20id%3D%22lingo-sub-810365%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERe%26nbsp%3B%3A%20Formule%20permettant%20de%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%0A%20%20%3CLINGO-BODY%20id%3D%22lingo-body-810365%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%0A%20%20%20%3CP%3EUn%20effet%20secondaire%20agr%C3%A9able%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%20Cette%20discussion%20m'a%20fait%20r%C3%A9fl%C3%A9chir%20%3A%3CBR%20%2F%3E%20Est-ce%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eque%20Contient%3C%2FFONT%3E%20augmente%20%C3%A9galement%20la%20vitesse%20des%20agr%C3%A9gations%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ECol..%3C%2FFONT%3E%20%3F%3C%2FP%3E%20%0A%20%20%20%3CP%3EEt%20croyez-le%20ou%20non%2C%20c'est%20le%20cas.%20Waouh%2C%20c'est%20le%20cas%20!!!!%3C%2FP%3E%20%0A%20%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot%2Fm-p%2F810363%2Fhighlight%2Ftrue%23M99287%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FComment-utiliser-la-formule-Col-Maximum-avec-un-quot-o%C3%B9-quot%2Fmp%2F810363%2Fhighlight%2Ftrue%23M99287%3C%2FA%3E%20%3C%2FP%3E%20%0A%20%20%20%3CBR%20%2F%3E%20%0A%20%20%20%3CP%3EUne%20id%C3%A9e%20de%20la%20raison%20pour%20laquelle%20la%20comparaison%20des%20personnages%20est%20si%20lente%20%3F%3C%2FP%3E%0A%20%20%3C%2FLINGO-BODY%3E%0A%20%0A%3CLINGO-SUB%20id%3D%22lingo-sub-810364%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810364%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ela%20lecture%20est%20%3A%203%20arguments%3C%2FP%3E%3COL%3E%3CLI%3Ex%20-%20une%20cha%C3%AEne%20de%20caract%C3%A8res%3C%2FLI%3E%3CLI%3E3%20options%20%3A%3CBR%20%2F%3E%20-%20%C3%A9l%C3%A9ment%20%C3%A0%20rechercher%3CBR%20%2F%3E%20-%20une%20liste%20de%20plusieurs%20%C3%A9l%C3%A9ments%20-%20l'un%20d'entre%20eux%20correspond-il%3CBR%20%2F%3E%20-%20un%20mod%C3%A8le%20%C3%A0%20rechercher%3C%2FLI%3E%3CLI%3Eargument%20optionnel%20%3A%20le%20d%C3%A9limiteur%20pour%20diviser%20x%20en%20mots%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%20%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F12282%22%20target%3D%22_blank%22%3E%40datanaut%3C%2FA%3E%20a%20%C3%A9crit%20%3A%3CBR%20%2F%3E%3CP%3E%20Ainsi%20(selon%20ma%20lecture%20simpliste)%2C%20soit%20x%2C%20soit%20la%20%7Bliste%7D%20pourrait%20contenir%20les%20mots%20%C3%A0%20rechercher%20ou%20la%20liste%20de%20mots%20avec%20lesquels%20les%20comparer.%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E-%26gt%3B%20oui.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CBLOCKQUOTE%3Einclus%20une%20colonne%20comme%20dans%20l'exemple%20de%20Jarmo%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EPour%20une%20formule%20en%20colonne%2C%20c'est%20toujours%20possible%2C%20selon%20l'id%C3%A9e%20%3A%3CBR%20%2F%3E%20Pour%20chaque%20ligne%2C%20JMP%20prendra%20automatiquement%20l'entr%C3%A9e%20de%20la%20colonne%20dans%20la%20ligne%20respective.%3CBR%20%2F%3E%20Lorsque%20vous%20utilisez%20l'%C3%A9diteur%20de%20formules%2C%20vous%20effectuez%20cette%20astuce%20tout%20le%20temps%2C%20sans%20m%C3%AAme%20vous%20en%20rendre%20compte.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810361%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810361%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMerci%20%C3%A0%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%40jthi%3C%2FA%3E%20et%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2687%22%20target%3D%22_blank%22%3E%40txnelson%3C%2FA%3E%20et%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26800%22%20target%3D%22_blank%22%3E%40hogi%3C%2FA%3E%20et%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58003%22%20target%3D%22_blank%22%3E%40mmarchandFSLR%3C%2FA%3E%20pour%20leurs%20r%C3%A9ponses%20et%20leurs%20efforts%20%C3%A0%20ma%20question.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJarmo%20a%20trouv%C3%A9%20mon%20probl%C3%A8me%20%3A%20changer%20la%20liste%20et%20l'%C3%A9l%C3%A9ment%20dans%20ma%20formule.%20Merci%20pour%20le%20morceau%20de%20code%20illustrant%20l'utilisation%20correcte.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Ere%3A%20%22Documentation%20un%20peu%20insuffisante%22%3CBR%20%2F%3E%20Je%20suis%20d'accord.%20Les%20instructions%20et%20l'exemple%20dans%20l'index%20des%20scripts%20me%20semblent%20un%20peu%20ambigus.%20Voici%20l'entr%C3%A9e%20pour%20l'index%20des%20scripts%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%20%22%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%22%3EContient%20l'article%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Ex%3C%2FSPAN%3E%3CSPAN%3E%2C%20%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Earticle%3C%2FSPAN%3E%3CSPAN%3E%7C%20%7B%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Eliste%3C%2FSPAN%3E%3CSPAN%3E%7D%20%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Emod%C3%A8le%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%2C%20%26lt%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Ed%C3%A9limiteur%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E...%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3EReturns%20a%20Boolean%20that%20indicates%20whether%20the%20word%20(%3CSPAN%20class%3D%22%22%3Earticle%3C%2FSPAN%3E)%2C%20one%20of%20a%20list%20of%20words%20(%3CSPAN%20class%3D%22%22%3Eliste%3C%2FSPAN%3E)%2C%20or%20pattern%20(%3CSPAN%20class%3D%22%22%3Emod%C3%A8le%3C%2FSPAN%3E)%20matches%20one%20of%20the%20words%20in%20the%20text%20represented%20by%20%3CSPAN%20class%3D%22%22%3Ex%3C%2FSPAN%3E.%20Words%20are%20delimited%20by%20the%20characters%20in%20the%20optional%20quoted%20delimiter%20(%3CSPAN%20class%3D%22%22%3Ed%C3%A9limiteur%3C%2FSPAN%3E)%20string.%20A%20comma%20is%20the%20default%20delimiter.%20Blanks%20are%20trimmed%20from%20the%20ends%20of%20each%20extracted%20word%20from%20the%20input%20text%20string%20(%3CSPAN%20class%3D%22%22%3Ex%3C%2FSPAN%3E).%3C%2FP%3E%3CP%3E%22%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EAinsi%20(selon%20ma%20lecture%20simpliste)%2C%20x%20ou%20la%20%7Bliste%7D%20pourrait%20contenir%20les%20mots%20%C3%A0%20rechercher%20ou%20la%20liste%20de%20mots%20avec%20lesquels%20les%20comparer.%20Quelques%20exemples%20suppl%C3%A9mentaires%20montrant%20des%20alternatives%20incluant%20une%20colonne%20comme%20dans%20l'exemple%20de%20Jarmo%20pourraient%20aider%20%C3%A0%20clarifier.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJ'ai%20d%C3%A9j%C3%A0%20mis%20la%20solution%20en%20pratique%20!%20Merci%20encore.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810318%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810318%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAh%2C%20super%20!%3CBR%20%2F%3E%3CBR%20%2F%3E%20Au%20d%C3%A9but%2C%20j'ai%20eu%20une%20assez%20mauvaise%20exp%C3%A9rience%20avec%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EWhere()%3C%2FFONT%3E%20-%20mais%20je%20ne%20me%20souviens%20plus%20pourquoi.%3CBR%20%2F%3E%20Peut-%C3%AAtre%20que%20j'ai%20utilis%C3%A9%20une%20mauvaise%20syntaxe%20-%20ou%20le%20probl%C3%A8me%20a%20%C3%A9t%C3%A9%20r%C3%A9solu%20entre-temps...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810290%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810290%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJe%20pense%20qu'il%20vaut%20la%20peine%20d'ajouter%20que%20la%20fonction%20Where()%20est%20beaucoup%20plus%20rapide%20(%26gt%3B%20un%20ordre%20de%20grandeur%20!)%20que%20%26lt%3B%20%3CSELECT%20where%3D%22%22%20or%3D%22%22%3E%26lt%3B%3CGET%20rows%3D%22%22%20where.%3D%22%22%3E%26lt%3B%26gt%3B%20Les%20noms%20par%20d%C3%A9faut%20sont%20ici(%201%20)%3B%20dt%20%3D%20Table%20de%20donn%C3%A9es(%20%22SATByYear%22%20)%3B%20Afficher(%20N%20lignes(%20dt%20)%20)%3B%20%2F%2FN%20lignes(dt)%20%3D%2021245376%3B%20maintenant%20%3D%20Heure%20HP()%3B%20dt%20%26lt%3B%26lt%3B%20S%C3%A9lectionner%20O%C3%B9(%20%3A%C3%89tat%20%3D%3D%20%22Wisconsin%22%20%7C%20%3A%C3%89tat%20%3D%3D%20%22Alabama%22%20)%3B%20Attendre(%200%20)%3B%20total%20%3D%20Heure%20HP()%20-%20maintenant%3B%20Imprimer(%20%22%26lt%3B%3C%2FGET%3E%3C%2FSELECT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ED%C3%A9sol%C3%A9%2C%20j'ai%20rat%C3%A9%20un%20wait()%20dans%20les%20ex%C3%A9cutions%20pr%C3%A9c%C3%A9dentes%20-%20qui%20inverse%20la%20r%C3%A9ponse%201...%20et%20conduit%20%C3%A0%20de%20nouvelles%20possibilit%C3%A9s%20pour%20%233%2C%20%234%20et%20%235%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Eles%20nouvelles%20d%C3%A9couvertes%20%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EContient%20l'%C3%A9l%C3%A9ment()%3C%2FFONT%3E%3CSPAN%3E%20%3C%2FSPAN%3Eest%20plus%20rapide%20avec%20la%20syntaxe%20de%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%40jthi%3C%2FA%3E%20-%20la%20v2%20est%20plus%20lente%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ES%C3%A9lectionnez%20o%C3%B9()%3C%2FFONT%3E%3CSPAN%3Edevient%20beaucoup%20plus%20rapide%20en%20le%20rempla%C3%A7ant%20par%3C%2FSPAN%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eobtenir%20les%20lignes%20where()%20%2B%20s%C3%A9lectionner%20les%20lignes().%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ESelect%20Where()%3C%2FFONT%3E%20devient%20significativement%20(!!)%20plus%20rapide%20en%20rempla%C3%A7ant%20la%20comparaison%20de%20cha%C3%AEne%20par%20l'%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3E%C3%A9l%C3%A9ment%20contient()%3C%2FFONT%3E%20.%3C%2FLI%3E%3CLI%3Ela%20combinaison%20(2)%20et%20(3)%20est%20assez%20comparable%3C%2FLI%3E%3CLI%3E...%20%C3%A9galement%20pour%20des%20ensembles%20de%20donn%C3%A9es%20plus%20volumineux.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731261697022.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731261697022.png%22%20style%3D%22width%3A%20330px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731261697022.png%22%20style%3D%22width%3A%20330px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70017i3B687F3FACA86149%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1731261697022.png%22%20alt%3D%22hogi_0-1731261697022.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EVoir%20plus...%3C%2FA%3E%3CNOSCRIPT%3E(Surligner%20pour%20lire)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0Await(0)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3CSELECT%20where%3D%22%22%3E%20%20%20names%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0Await(0)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731305493836.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731305493836.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731305493836.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70019i116F7A07829AD82B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1731305493836.png%22%20alt%3D%22hogi_0-1731305493836.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FP%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%3C%2FCODE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810228%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810228%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Eajout%C3%A9%20%C3%A0%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FTips-and-Tricks-best-practice-with-JMP-JSL%2Fm-p%2F662686%23U662686%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3ETrucs%20et%20astuces%20-%20bonnes%20pratiques%20avec%20JMP%2FJSL%3C%2FA%3E%3CBR%20%2F%3E%20Le%20n%C2%B04%20est%20surprenant.%20Pour%20le%20moment%2C%20je%20dirais%20%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1731241802910.png%22%20style%3D%22width%3A%20684px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731241802910.png%22%20style%3D%22width%3A%20684px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1731241802910.png%22%20style%3D%22width%3A%20684px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70011iB71AF709F9A7735D%2Fimage-dimensions%2F684x93%3Fv%3Dv2%22%20width%3D%22684%22%20height%3D%2293%22%20role%3D%22button%22%20title%3D%22hogi_0-1731241802910.png%22%20alt%3D%22hogi_0-1731241802910.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810225%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810225%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMerci%20pour%20le%20commentaire.%3CBR%20%2F%3E%20en%20creusant%20plus%20profond%C3%A9ment%20-%20en%20fait%2C%20il%20ne%20%3CSTRONG%3Econtient%20pas%20d'%C3%A9l%C3%A9ment%3C%2FSTRONG%3E%20par%20rapport%20%C3%A0%20%3CSTRONG%3ES%C3%A9lectionner%20O%C3%B9%3C%2FSTRONG%3E%20.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Equelques%20constatations%20%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3EContient%20l'%C3%A9l%C3%A9ment()%3C%2FFONT%3E%20est%20plus%20rapide%20avec%20la%20syntaxe%20inverse%20%22v2%22%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ES%C3%A9lectionnez%20o%C3%B9()%3C%2FFONT%3E%3CSPAN%3Edevient%20beaucoup%20plus%20rapide%20en%20le%20rempla%C3%A7ant%20par%3C%2FSPAN%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eobtenir%20les%20lignes%20where()%20%2B%20s%C3%A9lectionner%20les%20lignes().%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3ESelect%20Where()%3C%2FFONT%3E%20devient%20beaucoup%20plus%20rapide%20en%20rempla%C3%A7ant%20la%20comparaison%20de%20cha%C3%AEne%20par%20l'%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3E%C3%A9l%C3%A9ment%20contient()%3C%2FFONT%3E%20.%3C%2FLI%3E%3CLI%3Eet%20en%20combinant%20(2)%20et%20(3)%20le%20rend%20...%20facteur%202%20plus%20lent%20que%20(2)%20(%3F!%3F!)%3C%2FLI%3E%3CLI%3Edonc%2C%20le%20gagnant%20(pour%20cet%20ensemble%20de%20donn%C3%A9es)%20est%20le%20n%C2%B02%26nbsp%3B%3A%3C%2FLI%3E%3C%2FOL%3E%3CP%3Een%20tout%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_1-1731241317667.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1731241317667.png%22%20style%3D%22width%3A%20318px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_1-1731241317667.png%22%20style%3D%22width%3A%20318px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70010i802B20976A6FB607%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_1-1731241317667.png%22%20alt%3D%22hogi_1-1731241317667.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3Ed%C3%A9tails%3A%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EVoir%20plus...%3C%2FA%3E%3CNOSCRIPT%3E(Surligner%20pour%20lire)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3CSELECT%20where%3D%22%22%3Enames%20default%20to%20here(1)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWafer%20Stacked.jmp%22%20)%3B%0A%0ANew%20Column(%20%22x_y%22%2C%0A%09Character%2C%0A%09Formula(%20Concat%20Items(%20%7BChar(%20%3AX_Die%20)%2C%20Char(%20%3AY_Die%20)%7D%2C%20%22_%22%20)%20)%0A)%3B%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%221_3%203_9%22%2C%20%3Ax_y%2C%20%22%20%22%20)%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%22formula%20-%20contains%20item%22%2C%20t)%3B%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22contains%20item%20v2%22%2C%0A%09Character%2C%0A%09Formula(%20If(%20Contains%20Item(%20%3Ax_y%2C%20%7B%223_1%22%2C%224_4%22%7D)%20%2C%20%22exclude%22%2C%20%22not%20exclude%22%20)%20)%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20run%20formulas()%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%221)%20formula%20-%20contains%20item%20v2%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0ANew%20Column(%20%22get%20rows%20where%22%2C%0A%09Character%2C%0A%09set%20each%20value(%22not%20excluded%22)%20)%3B%0Amyrows%3D%5B%5D%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%09%0A%09myrows%20%3D%20V%20concat%20to%20(myrows%2C%20%20dt%20%26lt%3B%26lt%3B%20get%20rows%20where(%3Ax_y%20%3D%3D%20compare))%3B%09%0A)%3B%0Adt%20%26lt%3B%26lt%3B%20select%20rows(myrows)%3B%20%2F%2F%20just%20for%20fun%20-%20it's%20fast%0Adt%5Bmyrows%2C%22get%20rows%20where%22%5D%20%3D%20Repeat(%7B%22excluded%22%7D%2Cn%20items(myrows)%20)%3B%0At%3D%20(hptime()-t0)%2F1000000%3B%0Aprint(%222)%20get%20rows%20where%22%2C%20t)%3B%0A%0A%0A%0At0%3Dhptime()%3B%0Afor%20each(%20%7Bcompare%7D%2C%20%7B%223_1%22%2C%224_4%22%7D%2C%0A%09dt%26lt%3B%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%3C%2FCODE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJ'ai%20effectu%C3%A9%20quelques%20tests%20de%20synchronisation%20en%20comparant%20la%20solution%20de%20Jarmo%20%C3%A0%20ma%20solution%2C%20et%20la%20solution%20Contains%20Item%20est%20spectaculairement%20plus%20rapide%20que%20la%20solution%20Select%20Where.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810205%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810205%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUsually%20in%20cases%20like%20this%20I%20tend%20to%20use%20Words()%20to%20split%20the%20string%20into%20a%20list%20and%20then%20compare%20using%20Contains()%20(or%20in%20some%20rare%20cases%20Contains%20Item()).%20But%20Contains%20Item()%20should%20also%20work%20and%20you%20just%20seem%20to%20have%20your%20parameters%20in%20incorrect%20order%3CCODE%20class%3D%22%20language-jsl%22%3E%3C%2FCODE%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENew%20Table(%22Untitled%22%2C%0A%09Add%20Rows(3)%2C%0A%09Compress%20File%20When%20Saved(1)%2C%0A%09New%20Column(%22Column%201%22%2C%20Character%2C%20%22Nominal%22%2C%20Set%20Values(%7B%221_3%22%2C%20%223_7%22%2C%20%226_5%22%7D))%2C%0A%09New%20Column(%22Column%202%22%2C%0A%09%09Character%2C%0A%09%09%22Nominal%22%2C%0A%09%09Formula(%0A%09%09%09If(Contains%20Item(%221_3%203_9%22%2C%20%3AColumn%201%2C%20%22%20%22)%2C%0A%09%09%09%09%22exclude%22%2C%0A%09%09%09%09%22not%20exclude%22%0A%09%09%09)%0A%09%09)%2C%0A%09%09Set%20Selected%0A%09)%0A)%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-1731165057018.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1731165057018.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1731165057018.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F69998i2CF339F64E748A67%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_0-1731165057018.png%22%20alt%3D%22jthi_0-1731165057018.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EDeuxi%C3%A8me%20exemple%20de%20Scripting%20Index%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_1-1731165235628.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_1-1731165235628.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_1-1731165235628.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F69999iA84B197CAF014387%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_1-1731165235628.png%22%20alt%3D%22jthi_1-1731165235628.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_2-1731165277236.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_2-1731165277236.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_2-1731165277236.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F70000i70FDF9BF6918DBDD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_2-1731165277236.png%22%20alt%3D%22jthi_2-1731165277236.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eou%20la%20r%C3%A9f%C3%A9rence%20de%20syntaxe%20JSL%20ont%20des%20exemples%20int%C3%A9ressants%20%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F18.0%2F%23page%2Fjmp%2Fcharacter-functions-2.shtml%3Fos%3Dwin%26amp%3Bsource%3Dapplication%23ww6166335%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F18.0%2F%23page%2Fjmp%2Fcharacter-functions-2.shtml%3Fos%3Dwin%26amp%3Bsource%3Dapplication%23ww6166335%3C%2FA%3E%20mais%20la%20documentation%20manque%20un%20peu.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810201%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ER%C3%A9%3A%20Formule%20pour%20v%C3%A9rifier%20si%20l'un%20des%20%C3%A9l%C3%A9ments%20d'une%20liste%20est%20contenu%20dans%20les%20lignes%20d'une%20colonne%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810201%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EVoici%20l%E2%80%99approche%20que%20j%E2%80%99adopterais%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enames%20default%20to%20here(1)%3B%0Adt%3Dcurrent%20data%20table()%3B%0A%0Adt%20%26lt%3B%26lt%3B%20clear%20select%3B%0A%0Afind%20%3D%20%7B%223_1%22%2C%224_4%22%7D%3B%0A%0Afor%20each(%20%7Bcompare%7D%2C%20find%2C%0A%09dt%26lt%3B%3CSELECT%20where%3D%22%22%3E%0AOnce%20the%20rows%20are%20selected%2C%20then%20excluding%2C%20deleting%20etc.%20can%20be%20done.%3C%2FSELECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
datanaut
Level III

Formula to check if any of a list of items is contained in the rows of a column

JMP for Mac 

Version 17.2.0 (701896)

 

I have a column "Data" with rows of number_number like this:

1_3

3_7

6_5

...

 

I want to test this column to see if some of the rows contain values from a list of values and then flag or label the rows which do.

 

I know I could construct an elaborate formula like this:

If( :Die X_Y == "3_9" | :Die X_Y == "3_4",
	1,
	0
)

But that's very laborious for long lists of different values to check.  I'd like to just be able to paste a list of values to check for in a formula, delimited by a space or comma.  

 

I found the function "Contains Item."  It works fine for one item but the help entry doesn't offer any insight on how to construct the "list" option.  I tried this (specifying the optional delimiter as a space):

If( Contains Item( :Die X_Y, "3_4 3_9", " " ),
	"exclude",
	"not exclude"
)

and this:

If( Contains Item( :Data, "3_4,3_9", "," ),
	"exclude",
	"not exclude"
)

I understand the default delimiter is a comma but wanted to enforce to find anything that works.  Neither Contains Item function is returning the sought-for behavior (logical 1 if there is a match, 0 if not).  If there is a better function to use please advise.  

 

This is a generalized problem I'd like to be able to solve -- inspecting a column to find matches with long lists of items.  

 

Thanks

 

15 REPLIES 15
hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

the reading is: 3 arguments

  1. x - a string of characters
  2. 3 options:
    - item to search
    - a list of several items - does one of them match?
    - a pattern to search
  3. optional argument: the delimiter to split x in words

 


@datanaut wrote:

So (to my simplistic reading) either x or the {list} could contain the words to be searched or the list of words to compare it with.  


-> yes.

 

 included a Column as in Jarmo's example 

For a column formula, this is always possible, along the idea:
For every row, JMP will take automatically the entry of the column in the respective row.
When you use Formula editor, you do this trick all the time - just without noting.

hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

A nice side effect:

This discussion made me think:
does Contains also increase the speed of Col .. aggregations?

And believe it or not - it does. wow, it does!!!!

https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot... 

 

Any clue why the character comparison is SOOO slow?

hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

I wondered if deleting rows without selecting them is much faster:

dt << select rows(myRows) << delete rows();
dt << delete rows();

[actually, I wondered why the corresponding << exclude(myRows) is missing.]

 

So, here is another speed test:

Names Default to here(1);
get timing = Function( {myExpr},
	dt = New Table( "test", add rows( 10000000 ), New Column( "rnd", set each value( Random Integer( 1000 ) ) ) );
	myRows = Random Shuffle( Index( 1, N Rows() ) )[Index( 1, N Rows() / 2 )];
	t0 = HP Time();
	myExpr;
//print(n rows()); // same timing without this line
	If( N arg( myExpr ) > 2,
		Print( Char( Head( Arg( myExpr, 2 ) ) ) || " + " || Char( Head( Arg( myExpr, 3 ) ) ) ),
		Print( Char( Head( Arg( myExpr, 2 ) ) ) );
	);
	Print( Char( (HP Time() - t0) / 1000000 ) || " s\!n" );
	Close( dt, noSave );
);

get timing( Expr( dt << select rows( myRows ) << delete rows ) );

get timing( Expr( dt << delete rows( myRows ) ) );

get timing( Expr( dt << select rows( myRows ) << exclude( 1 ) ) );

Print("-------------");

get timing( Expr( dt << select where( :rnd > 500 ) ) );

get timing( Expr( dt << get rows where( :rnd > 500 ) ) );

get timing( Expr( myRows = Where( dt, :rnd > 500 ) ) );

Print("_____________");
	

hogi_1-1764746400738.png

So,  deleting rows without selecting them is just marginally faster.
-> no wonder there is no corresponding function for Exclude.

hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

by the way:

Print("_________");
Print("__X______");
Print("X________");

hogi_2-1764747078244.png

why?

jthi
Super User

Re: Formula to check if any of a list of items is contained in the rows of a column

My guess is that Print is doing some parsing/evaluations as it is meant to be used for displaying values of arguments. And when you start -"variable" with two underscores it is considered hidden -> possibly some interaction with Print() to not make it leak those values.

-Jarmo
hogi
Level XIII

Re: Formula to check if any of a list of items is contained in the rows of a column

show("__");
myString="__";
show(myString);
show("_"|| "_");

__x="secret";
show(__x);
show(name Expr(__x));
show(Eval(__x));

hogi_0-1764749234016.png

 

a second layer of ulra-tight protection ; )

Recommended Articles