For example, remove the "S" from all names in the "name" column of "Big class.jMP ".
Can do it directly by substitution?Can the new VERSION of JMP be implemented?get looks like the "rename" column.
Thanks!
You can create a column formula to perform the substitution: Substitute(:name,"S","")
In code it would look something like this:
dt = Current Data Table(); dt = New Column( "New Name", Character, "Nominal", Formula( Substitute( :name, "S", "" ) ) );
How do you use JSL to perform the replacement operation to achieve this manual effect?
Replace column 2, "5" with null in a perfectly matched fashion, and "15" or "25" in this column are unaffected.
Numeric data should not pose a problem. See this example:
Names Default to Here( 1 ); dt = New Table( "Substitution", New Column( "Old Data", Numeric, Continuous ), New Column( "New Data", Numeric, Continuous ) ); :Old Data << Set Values( J( 50, 1, Random Integer( 3, 18 ) ) ); Wait( 2 ); For Each Row( :New Data = Substitute( :Old Data, 5, . ); );