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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

42 4 Input and outputCELLRANGE='A2:D115'; COLUMNS=ColsDetails of the other options and parameters of IMPORT are in the on-line help.4.4 PracticalThe file Traffic.xls is an Excel data file with one worksheet called counts storing oneset of data in the area B3:D43. Use the IMPORT procedure to read the data into GenStat,converting day and month to factors. Examine the distribution of the counts using ahistogram. (Hint: use the Summarize Contents of Variates menu).4.5 Exporting data to filesGenStat spreadsheet files can be created using the FSPREADSHEET procedure. Forexample, we could create a spreadsheet file Ispread.gsh, containing the ironmeasurements from Section 4.1, by using the commandFSPREADSHEET [OUTFILE='Ispread.gsh'] sample,site,FE,weightThe OUTFILE option specifies the name (and path) of the file. If this is omitted whenGenStat is running interactively, the spreadsheet is opened as a window in the client. (Itcan then be saved, later, to a file using the Save or Save as sub-options of the File menuon the menu bar.) The data structures to put into the spreadsheet are specified by the firstparameter of the procedure, DATA. Other options and parameters allow you, for example,to add a page to a multi-page spreadsheet, to protect columns by making them read-only,to specify a title, or to save analysis commands. Full details are in the on-line help.Data can be saved in other types of file using the EXPORT procedure. For example, wecould create an Excel file Ispread.xls, containing the iron measurements from Section4.1, by using the commandEXPORT [OUTFILE='Ispread.xls'] sample,site,FE,weightThe OUTFILE option again specifies the name (and path) of the file; the file extensionxls tells EXPORT that we want to create an Excel file. The available extensions are:.XLS for Excel, .XLSX for Excel 2007, .WQ1 for Quattro, .ODS for Open OfficeSpreadsheet, .DBF for dBase, .FMT for Gauss, .SDD for SPlus, .RDA for R, .TPT forSAS transport, .TAB for tab delimited text, .WOR for Instat, .MAT for MatLab, .ARFF forWeka Attribute, .TXT for plain ASCII text, .CSV for comma delimited text, .TAB for tabdelimited text, .HTM for a HTML table, .RTF for Word Rich text format, .GSH forGenStat spreadsheet, .GWB for GenStat work book, and .BMP, .EMF, .GIF, .JPG, .TIF,.PNG or .PSD for an image file. An image file can be created either from single matrixcontaining RGB colour values, or three columns of variates or factors columns(specifying x-coordinates, y-coordinates and RGB colour values), or five columns ofvariates or factors columns (specifying x-coordinates, y-coordinates and red, green andblue colour values). The coordinate (0, 0) corresponds to the top left corner of the image,and the y-values increase as you move down the image.The SHEETNAME option allows you to specify the name of the sheet to add to an Excelfile, rather than using the default 'GenStat data'. The name should only containletters, numbers and spaces.The METHOD option controls how EXPORT behaves when asked to overwrite an existingfile. The available settings are add, append, overwrite, prompt and fail, with adefault of prompt when running interactively, and fail when running in batch.The data structures to put into the spreadsheet are again specified by the first parameterof the procedure, DATA.The COLUMNS parameter can specify names for the columns. By default, if you aresaving variates, factors or texts, their identifiers are used. The setting is a text with asingle line except for a matrix, where it should have a line for each column and also anextra initial line if the matrix has row labels.The PLAINNAMES option allows you to suppress the additional type information that

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

Saved successfully!

Ooh no, something went wrong!