Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
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
Highlighted
Super User

## Re: Set Column Values

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

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

2 REPLIES 2
Highlighted
Super User

## Re: Set Column Values

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

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

Highlighted
Level VI

## Re: Set Column Values

Thanks MS!

Article Labels

There are no labels assigned to this post.