cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
%3CLINGO-SUB%20id%3D%22lingo-sub-773890%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWie%20gelangt%20Textformatinhalt%20ohne%20Wiederholung%20in%20den%20Speicher%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%3EWie%20diese%20erste%20Spalte%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%3EDanke!%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%3EGrundlegende%20Datenanalyse%20und%20Modellierung%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%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%3EBetreff%3A%20Wie%20gelangt%20Textformatinhalt%20ohne%20Wiederholung%20in%20den%20Speicher%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773912%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EVerwenden%20Sie%20Summarize()%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%3Eoder%20assoziatives%20Array()%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%3Eoder%20erstellen%20Sie%20eine%20%C3%9Cbersichtstabelle%20und%20beziehen%20Sie%20die%20Werte%20von%20dort%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%3EAlle%20diese%20haben%20ihre%20eigenen%20Anwendungsf%C3%A4lle%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774015%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Wie%20gelangt%20Textformatinhalt%20ohne%20Wiederholung%20in%20den%20Speicher%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774015%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDanke%2C%20Experten!%3C%2FP%3E%3CP%3EKann%20eine%20bereits%20im%20Speicher%20vorhandene%20Liste%20durch%20eine%20%C3%A4hnliche%20Funktion%20gefiltert%20werden%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%3EBetreff%3A%20Wie%20gelangt%20Textformatinhalt%20ohne%20Wiederholung%20in%20den%20Speicher%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAlle%20Methoden%20funktionieren%2C%20aber%20f%C3%BCr%20summary%2Fsummarize%20m%C3%BCssen%20Sie%20zuerst%20eine%20Datentabelle%20erstellen.%20F%C3%BCr%20assoziative%20Arrays%20ist%20es%20einfacher%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%3E%3A%20Scripting%20Guide%20%26gt%3B%20Datenstrukturen%20%26gt%3B%20Assoziative%20Arrays%20in%20JSL-Skripten%20%26gt%3B%20Assoziative%20Arrays%20erstellen%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