cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to the recently reported Microsoft outage, users may be temporarily unable to access My JMP or experience a delay receiving their verification codes. If you have previously installed JMP on your computer, this outage should not impact your ability to access the software. My JMP services will be restored as soon as Microsoft resolves this issue.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
robot
Level VI

Set Column Values

I am creating several data tables, where I will add a Character column with repeating values.  I am using the repeat function to do this.  My trouble is that it seems to take a very long time for large repeat values.  Is there a more efficient way to do this?  I am using JMP11.  Thanks!

// Example.

Names Default To Here( 1 );

t1 = Tick Seconds();

dt = New Table( "50000 Rows", Add Rows( 50000 ),

      New Column( "Hello!", Character, Nominal, Set Values( Repeat( {"Hi!"}, 50000 ) ) )

);

t2 = Tick Seconds();

Print( Concat( Char( t2 - t1 ), " seconds." ) );

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Set Column Values

Set Each Value() should be a little more efficient:

New Column( "Hello!", Character, Nominal, Set each value("Hi!") )

View solution in original post

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Set Column Values

Set Each Value() should be a little more efficient:

New Column( "Hello!", Character, Nominal, Set each value("Hi!") )

robot
Level VI

Re: Set Column Values

Thanks MS!

Recommended Articles