13.07.2015 Views

Download pdf guide - VSN International

Download pdf guide - VSN International

Download pdf guide - VSN International

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.6 Practical 59Notice that any missing values are placed first, in ascending or descending sorting.If the NEWVECTOR parameter is omitted, the sorted values are placed into the structuresin the OLDVECTOR parameter themselves, thereby losing the original ordering. We showthis below, at the same time as demonstrating that you can use more than one indexvector; the values are sorted first according to the rates of pay, and then, where severalpeople have the same rate, according to alphabetic order of names.69 " Sort into alphabetic order within (ascending) pay rates."70 SORT [INDEX=rate,name] OLDVECTOR=name,rate,monthpay71 PRINT name,rate,monthpay; DECIMALS=0,2,2name rate monthpayDay 6.25 856.25Grey 6.25 1187.50Innes 6.25 1281.25Jones 6.25 1218.75Baker 7.50 1435.00Clarke 7.50 1382.50Edwards 7.50 1095.00Foster 10.00 1740.00Hill 10.00 *Adams 15.00 1875.005.6 PracticalUsing the data on sales of personal computers in Practical 5.2, sort (and print) the monthsaccording firstly to the number of PC's sold in each one, and then according to the profitsmade in each.5.7 Other manipulation facilitiesThere are many other facilities for data manipulation in GenStat, which we do not haveto space to describe here. We list below some of the more useful with references, inbrackets, to the relevant sections of the Guide to the GenStat Command Language, Part1 Syntax and Data Management:APPENDappends values of a list of vectors of the same type(4.4.4)STACKcombines several data sets by "stacking" thecorresponding vectors (4.4.5)UNSTACKsplits vectors into individual vectors according tolevels of a factor (4.4.6)EQUATEcopies values between sets of data structures(4.3.1)SETRELATEcompares the sets of values in two data structures(4.3.2)SETCALCULATEperforms Boolean set calculations on the contentsTXCONSTRUCTof vectors and pointers (4.3.3)forms a text structure by appending orconcatenating values of scalars, variates, texts,factors or pointers; allows the case of letters to bechanged or values to truncated and reversed(4.7.2)The best summary of all the data manipulation commands is in Section 1.7 of the Guideto the GenStat Command Language, Part 2 Statistics. A more detailed description, withexamples, is in Chapter 4 of the Guide to the GenStat Command Language, Part 1 Syntaxand Data Management.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!