cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-773890%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EComment%20le%20contenu%20au%20format%20texte%20reste-t-il%20en%20m%C3%A9moire%20sans%20r%C3%A9p%C3%A9tition%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773890%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EComme%20cette%20premi%C3%A8re%20colonne%20%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0Adt%20%26lt%3B%26lt%3B%20Add%20Rows(%201%2C%20after(%20N%20Row(%20dt%20)%20)%20)%3B%0Adt%5BN%20Rows(%20dt%20)%2C%201%5D%20%3D%20dt%5B1%2C%201%5D%3B%0A%0Aar%20%3D%20dt%20%26lt%3B%26lt%3B%20GetAsMatrix(%201%20)%3Bnn%20%3D%20Matrix(%20Associative%20Array(%20ar%5B0%2C%201%5D%20)%20%26lt%3B%26lt%3B%20getKeys%20)%3B%2F%2F%EF%BC%9F%EF%BC%9F%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%3EMerci!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-773890%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAnalyse%20et%20mod%C3%A9lisation%20des%20donn%C3%A9es%20de%20base%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eles%20fen%C3%AAtres%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773912%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%20%3A%20Comment%20le%20contenu%20au%20format%20texte%20entre-t-il%20en%20m%C3%A9moire%20sans%20r%C3%A9p%C3%A9tition%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773912%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUtilisez%20R%C3%A9sumer()%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FBig%20Class.jmp%22)%3B%0Adt%20%26lt%3B%26lt%3B%20Add%20Rows(1%2C%20after(N%20Row(dt)))%3B%0Adt%5BN%20Rows(dt)%2C%201%5D%20%3D%20dt%5B1%2C%201%5D%3B%0A%0ASummarize(dt%2C%20uniq%20%3D%20By(Column(dt%2C%201)))%3B%0A%0Ashow(uniq)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eou%20tableau%20associatif()%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EAssociative%20Array(Column(dt%2C%201))%20%26lt%3B%26lt%3B%20get%20keys%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eou%20cr%C3%A9ez%20un%20tableau%20r%C3%A9capitulatif%20et%20obtenez%20des%20valeurs%20%C3%A0%20partir%20de%20l%C3%A0%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt_summary%20%3D%20dt%20%26lt%3B%26lt%3B%20Summary(%0A%09Group(Column(dt%2C%201))%2C%0A%09Freq(%22None%22)%2C%0A%09Weight(%22None%22)%2C%0A%09Link%20to%20original%20data%20table(0)%2C%0A%09private%0A)%3B%0A%0Aa%20%3D%20dt_summary%5B0%2C%201%5D%3B%0AClose(dt_summary%2C%20No%20save)%3B%0Ashow(a)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ETous%20ont%20leurs%20propres%20cas%20d'utilisation%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774015%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%20%3A%20Comment%20le%20contenu%20au%20format%20texte%20entre-t-il%20en%20m%C3%A9moire%20sans%20r%C3%A9p%C3%A9tition%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774015%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMerci%20les%20experts%20!%3C%2FP%3E%3CP%3EUne%20liste%20d%C3%A9j%C3%A0%20en%20m%C3%A9moire%20peut-elle%20%C3%AAtre%20filtr%C3%A9e%20par%20une%20fonction%20similaire%20%3F%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ea1%3D%7B%22A%22%2C%22B%22%2C%22C%22%2C%22D%22%2C%22E%22%2C%22B%22%2C%22C%22%2C%22D%22%2C%22E%22%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%20%3A%20Comment%20le%20contenu%20au%20format%20texte%20entre-t-il%20en%20m%C3%A9moire%20sans%20r%C3%A9p%C3%A9tition%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EToutes%20les%20m%C3%AAmes%20m%C3%A9thodes%20fonctionnent%2C%20mais%20pour%20r%C3%A9sumer%2C%20vous%20devez%20d'abord%20cr%C3%A9er%20un%20tableau%20de%20donn%C3%A9es.%20Pour%20les%20tableaux%20associatifs%2C%20c'est%20plus%20simple.%20%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.2%2F%23page%2Fjmp%2Fcreate-associative-arrays.shtml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGuide%20de%20script%20%26gt%3B%20Structures%20de%20donn%C3%A9es%20%26gt%3B%20Tableaux%20associatifs%20dans%20les%20scripts%20JSL%20%26gt%3B%20Cr%C3%A9er%20des%20tableaux%20associatifs%3C%2FA%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Aa1%20%3D%20%7B%22A%22%2C%20%22B%22%2C%20%22C%22%2C%20%22D%22%2C%20%22E%22%2C%20%22B%22%2C%20%22C%22%2C%20%22D%22%2C%20%22E%22%7D%3B%0A%0Aa2%20%3D%20Associative%20Array(a1)%20%26lt%3B%26lt%3B%20get%20keys%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
lala
Level VIII

How does text format content get in memory without repetition?

Like this first column:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Add Rows( 1, after( N Row( dt ) ) );
dt[N Rows( dt ), 1] = dt[1, 1];

ar = dt << GetAsMatrix( 1 );nn = Matrix( Associative Array( ar[0, 1] ) << getKeys );//??

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How does text format content get in memory without repetition?

Use Summarize()

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Add Rows(1, after(N Row(dt)));
dt[N Rows(dt), 1] = dt[1, 1];

Summarize(dt, uniq = By(Column(dt, 1)));

show(uniq);

or associative array()

Associative Array(Column(dt, 1)) << get keys

or create summary table and get values from there

dt_summary = dt << Summary(
	Group(Column(dt, 1)),
	Freq("None"),
	Weight("None"),
	Link to original data table(0),
	private
);

a = dt_summary[0, 1];
Close(dt_summary, No save);
show(a);

All of these have their own use cases

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: How does text format content get in memory without repetition?

Use Summarize()

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Add Rows(1, after(N Row(dt)));
dt[N Rows(dt), 1] = dt[1, 1];

Summarize(dt, uniq = By(Column(dt, 1)));

show(uniq);

or associative array()

Associative Array(Column(dt, 1)) << get keys

or create summary table and get values from there

dt_summary = dt << Summary(
	Group(Column(dt, 1)),
	Freq("None"),
	Weight("None"),
	Link to original data table(0),
	private
);

a = dt_summary[0, 1];
Close(dt_summary, No save);
show(a);

All of these have their own use cases

-Jarmo
lala
Level VIII

Re: How does text format content get in memory without repetition?

Thanks Experts!

Can a list already in memory be filtered by a similar function?

a1={"A","B","C","D","E","B","C","D","E"};
jthi
Super User

Re: How does text format content get in memory without repetition?

All of the same methods work, but for summary/summarize you have to first create a data table. For associative array it is more simple Scripting Guide > Data Structures > Associative Arrays in JSL Scripts > Create Associative Arrays 

Names Default To Here(1);

a1 = {"A", "B", "C", "D", "E", "B", "C", "D", "E"};

a2 = Associative Array(a1) << get keys;
-Jarmo