46.0 TRANSPOSE Command The TRANSPOSE command allows the user to transpose the data matrix and print it using a number of options. Form of TRANSPOSE command. B34SEXEC TRANSPOSE parameters$ VAR variables $ B34SRUN$ TRANSPOSE sentence parameters. COLPREFIX=k Sets up to 3 characters for Col. Default = Col. Columns will be saved as Col1 Col2 Col3 ... COLVAR=K Sets the character variable to use as the col head. It is imperative that VNAME be a B34S character variable containing valid B34S names. If COLVAR is not set, COLPREFIX is used. ROWVAR=k If k = NUMBER, rows are numbered 1...... If k is NAME, the old B34S names are used as row names. ROWVAR=NAME is the default IBEGIN=n1 Sets first observation to use. Default = 1. IEND=n2 Sets last observation to use. Default = last observation in dataset. COMMENT(' ') Sets Heading. Up to 72 characters can be supplied. VAR sentence. The var sentence is used to specify the variables to transpose. If this sentence is not present, all variables will be rotated. The order in which the variables are listed on the VAR sentence determines the order of the rows saves from top to bottom. Note: The TRANSPOSE command always executes at once. This means that if ALLRUNOFF is in effect, the job step prior to the TRANSPOSE step must end in B34SRUN$. If TRANSPOSE is called from the menu facility of the display manager, there are no problems. To avoid confustion. With version 7.31d onward ALLRUN is the default. Example # 1 The Data matrix is rotated and printed. The Columns are Col1 Col2 .... The Rows are printed as the old variable names b34sexec transpose $ b34seend$ Example # 2 The Data matrix is rotated and printed. The Columns are V1 V2 .... The Rows are printed as numbers. b34sexec transpose colprefix=V rowvar=number$ b34seend$ Example # 3 The Data matrix is rotated and printed. The Columns are V1 V2 .... The old names label the Rows. Only the variables x1 x2 x3 are listed b34sexec transpose colprefix=V rowvar=name$ var x1 x2 x3$ b34seend$ Example # 4 The Data matrix is rotated and printed. The columns are from variable stock. The Rows are printed as numbers. Only the variables x1 x2 x3 are rotated. b34sexec transpose colvar=stock rowvar=number$ var x1 x2 x3$ b34seend$ Example # 5 Simple transpose /$ Tests Transpose sentence b34sexec data$ character name$ input name age weight$ datacards$ Joe 44 210 Bill 33 170 Mary 44 120 Carol 55 110 Dick 77 200 b34sreturn$ b34srun$ b34sexec list comment('Original data')$ b34srun$ b34sexec transpose comment('Transposed Data')$ b34srun$