Guide to using the spreadsheet
See Also
GenStat has extensive spreadsheet facilities for data entry, import, export and manipulation. A GenStat spreadsheet provides a way of visibly displaying and manipulating your data. Within GenStat you can have multiple spreadsheets contained together within a single book. Each spreadsheet is contained on a separate page within the book and is known as a sheet. Each page has an associated tab displayed above the sheet containing the name of the sheet. If a book only contains one sheet, then no tab is displayed.

Spreadsheet Types

In GenStat data are stored in different types of data structures, such as scalars, variates, factors and matrices. There are six different types of spreadsheets that can be used to display or manipulate data.

  1. Vector Spreadsheet
    This is the default type of spreadsheet and can contain one or more vector data structures (variates, texts and factors). Each column within the spreadsheet contains the values of one data structure and all the data structures must be the same length. By default, columns are variates, but they can easily be converted to another data type.

  2. Scalar Spreadsheet
    This type of spreadsheet can contain a single row of one or more scalars (single value).

  3. Table Spreadsheet
    This type of spreadsheet can contain tables. A table is a data structure that stores a multi-dimensional array of numbers where each dimension is classified by a factor. A spreadsheet can display tables with up to 9 dimensions. One dimensional tables that have the same classifying factor can be displayed on the same sheet, otherwise only a single table can be displayed on a sheet.

  4. Matrix Spreadsheet
    This type of spreadsheet can contain a single matrix.

  5. Symmetric Matrix Spreadsheet
    This can contain a single symmetric matrix. Only the values of the lower triangle of the symmetric matrix are displayed. The cells in the upper triangle are empty and values cannot be entered in these cells.

  6. Diagonal Matrix Spreadsheet
    This can contain a single diagonal matrix where the values are displayed within a column.

Creating spreadsheets

A blank spreadsheet can be created by selecting either New | Create from the Spread item or New from the File item on the menu bar. This opens a dialog where the spreadsheet type and initial number of rows and columns for the spreadsheet can be specified. The initial number of rows and columns need not be set to the exact size required as these can always be extended or removed at a later date.

A spreadsheet can be created with data by loading data that is currently present in GenStat by selecting New then Data in GenStat from the Spread menu bar item. Spreadsheets can also be created by opening data from files.

Converting between spreadsheet types

You can convert from one type of spreadsheet to another using the Convert command from the Column section on the Spread menu.

Updating the data in GenStat

Data displayed within a spreadsheet are not maintained simultaneously within the GenStat data core. This allows data to be manipulated without continuously updating the data core. Therefore, any changes to the data should be updated in GenStat before the data can be used within menus or programs. By default, data is automatically updated in GenStat whenever you switch focus from the spreadsheet and activate another window or menu (for example, by clicking in another window or menu). The automatic updating facility can be disabled by removing the check box selection at the bottom left of the spreadsheet window or by using the Auto Update GenStat item on the Update submenu on the Spread item of the menu bar. If the auto updating feature is not enabled then data can be manually updated in GenStat using the Update submenu on the Spread item of the menu bar.

Maintaining multiple book windows

In GenStat you can have more than book open at a time and books can contain multiple spreadsheets. The Spread menu commands on the menu bar act on the current spreadsheet within the active book. The current spreadsheet is indicated within the Window title for the book and also on the status bar. If you load data from the same data structure into more than one spreadsheet (in the same book or in different books) a separate copy of the data will be maintained in each spreadsheet. In this situation caution must be taken so that you only update GenStat from the appropriate copy of data.

Opening and saving GenStat spreadsheets

GenStat spreadsheets and books can be open and saved in a wide range of formats. The best way to save spreadsheets is to use GenStat's spreadsheet (GSH) or book (GWB) format. For multi-paged books all the spreadsheets within the book can saved using the GenStat Book (GWB) format. This format preserves all the column attributes such as type, widths, decimal places etc... for each spreadsheet contained within book. Individual spreadsheets can be saved in the GenStat Spreadsheet (GSH) format, like the book format this preserves all column attributes. Data saved in either the GWB or GSH format can be opened into a spreadsheet/book or directly as GenStat data. Data can also be opened into a spreadsheet or book from many other data formats such as Excel, Quattro etc...

Manipulating data

There are a wide range of facilities in GenStat for manipulating data within a spreadsheet. These include facilities such as sorting, restricting, stacking and unstacking data. All these facilities can be accessed using the Spread menu bar item. A shortcut to some of the most common manipulation commands can be accessed by using the right-click menu on the spreadsheet.

Examples

Figure 1 - This shows an example of a book containing a single Vector spreadsheet. Click on any part of the picture below for information on its function.

Figure 2 - This shows an example of a book containing 2 sheets. The visible sheet is called Sheet2 and is a Matrix spreadsheet.

See Also