Workbook
The StatsDirect workbook operates like spreadsheet software such as Microsoft Excel. If you know how to use Excel then you will find your way around the StatsDirect worksheet easily.
This page gives the basic information that you need to get started using the StatsDirect workbook. You may also wish to try one of the many Excel tutorials on the Web if you are new to working with spreadsheets.
You can work with up to 16,384 columns and 1,048,576 rows, but in reality you are limited by the amount of memory your computer has: Very large spreadsheets will run slowly unless you have a large amount of memory and run StatsDirect on a 64-bit version of Windows. On Mac, the same limits apply, and memory is the practical limit.
WORKING WITH DATA IN WORKSHEETS
INTRODUCTION
A workbook consists of worksheets that are divided into rows and columns forming a matrix of cells. You may enter data or formulae into cells. The active cell is highlighted with a rectangular border, you can move the active cell by clicking on another cell with the mouse or by using the cursor keys (arrows).
ENTERING DATA
Numbers entered can range from -1E+307 to 1E+307. Text is any sequence of letters and numbers which the workbook does not recognise as another form of data. If you want to enter numbers as labels then you must put quotes around them, i.e. "2" is treated as a string and 2 is treated as a number. See dates and times for more information on these data forms. Logical data are true or false, true is represented by 1 and false by 0 in any analysis you perform. If you want to enter coded data such as M, F, Male, female etc. then please use the search and replace function to convert them to numerical codes before analysis. On Mac, numbers can range up to about ±1.8E+308, and a larger entry is kept as text. TRUE and FALSE are read as text, so an analysis that needs numbers reports them as not numeric: enter 1 and 0 instead. A number in row 1 names its column when First row has column names is ticked, so quotes are not needed, and quotes typed into a cell stay in it as part of the text.
COPYING AND MOVING DATA
Most spreadsheet software enables you to select cells and copy/paste/delete/move them. Selected cells are displayed with a black background instead of white. To select an entire sheet you can click on the top left hand cell where row headings intersect with column headings. To select a single range of cells hold down the left mouse button and drag the mouse over them, or hold down the shift key and use the arrow keys to highlight the range. To select more than one range at a time hold down the Ctrl key and select ranges as described. Once you have the range(s) you want selected you can copy, delete, paste or move the data. To copy the selected range(s) to memory, hold down the Ctrl key and press the C key. You can then hold down the control (Ctrl) key and press the V key to retrieve the range and paste them into the same workbook at a different location, another StatsDirect workbook or an external application such as Microsoft Excel. Data can be copied from external spreadsheets into StatsDirect in this way also. To move a selected range, position the mouse cursor over a border of the range and drag the range using the mouse. You can also use cut and paste operations to move ranges. The delete key clears a selected range. If you accidentally delete or move data then press Ctrl+Z or select "Undo" from the edit menu to undo the change.
On Mac, use the Command key in place of Ctrl: Command-C, Command-X, Command-V and Command-Z. Selected cells are shaded pale green inside a dark green outline. You can select one block of cells at a time, or hold down Command and click column letters or row numbers to select several whole columns or rows. You cannot drag a range to move it: cut it with Command-X and paste it with Command-V.
LABELLING COLUMNS
StatsDirect analyses most data in columns. The label for a column can be put in the first row or in any other area of that column which might be selected as a sub-column to analyse, i.e. one column of the workbook can contain more than one column for analysis. If a selected range of cells does not contain a string at the top then StatsDirect uses the workbook column label as its heading otherwise the first string in a selected range is used as the label for that selection. The test data file supplied with StatsDirect uses text strings in row 1 as labels for each column. You can set the header label of a column by double clicking on it with the left mouse button. Row labels can be set in the same way.
On Mac, a selection always takes its column's name: the text in row 1 when First row has column names is ticked below the worksheet, and otherwise Column A, Column B and so on. Text at the top of a selected range is read as data, not as a label. You name a column by typing the name in row 1 with First row has column names ticked; double-clicking a column letter does not rename it, and rows are numbered without labels.
ENTERING FORMULAE
If you are familiar with using formulae in spreadsheets such as Microsoft Excel then you will be able to use formulae in StatsDirect workbooks without further instruction. An entry is treated as a formula if you start with the equal to sign "=", i.e. =A1-B1 gives the subtraction of column 2 row 1 from column 1 row 1. A range of cells is represented by a colon, i.e. A1:B10 is the range from column 1 row 1 to column 2 row 10. If you want to repeat a formula but make it relevant to the columns below or to the right then enter the first formula and move the mouse cursor to the bottom right hand corner of the cell. Now hold down the left mouse button and drag down; you will see that the formulae below are not just copies of the parent formulae but that all cell references have been translated to those relevant to the particular row/column you have dragged to. Here the cell references change because they are relative, if you want to make them absolute then put a dollar sign "$" before either part of the reference, i.e. $A1 is absolute column 1 relative row 1 and $A$1 is absolute column 1 row 1. See Worksheet Functions for information on the functions most commonly used in formulae.
On Mac, the worksheet does not calculate formulae: an entry starting with = is kept as text, formula cells in an Excel workbook show the values Excel last saved and cannot be edited, and there is no fill handle to copy a formula.
On Windows, Learn and AI Assist on the worksheet toolbar open the lesson library and workbook assistant. See Worksheet Learn and AI Assist for questions, optional workbook sharing, and running suggested analyses in StatsDirect or R.
WORKSHEET DATA IN R
R on the worksheet toolbar opens a new R script window and copies the data into its R session. R+ takes the data to R outside StatsDirect. On Windows it opens R's own window, RGui, with the data loaded. On Mac it opens the script in RStudio when that is installed, in RStudio's current session, where nothing runs until you run it; otherwise a new R.app session loads the data. Each first asks which data to copy into R as worksheet_data: the entire worksheet, the selected cells or no data. The selected cells can be one rectangle, several whole columns or several whole rows; whole columns or rows are cut to the part that holds data. Choose whether R receives a data frame or a list of vectors, whether the first row gives the column names, and whether the names are made R-friendly: unique names that R accepts without quotes. In a list of vectors, the missing values are removed from each vector separately.
In any column, blank cells, text of spaces only, StatsDirect's missing-value marker * and its category marker * (missing), the markers . NA N/A NaN NULL and MISSING written exactly so, and spreadsheet errors such as #DIV/0! are NA. In a column that otherwise holds numbers, logical values, dates or date-times, the words na, n/a, nan, null and missing are NA in any case. Numbers arrive exactly. In a column of numbers, a number stored as text counts as a number; a code with a leading zero, such as 0012, stays text, and so does the rest of its column. A column of dates without times of day becomes R dates; date-times, times of day and durations arrive as text, such as 2026-11-21 10:00:00. Columns without headings are named by their letters. The first lines of the import script say which worksheet and cells the data came from, and str(worksheet_data) at its end shows what R received. On Mac, a formula cell sends the value saved with the workbook, so StatsDirect asks you to recalculate and save the workbook in Excel, then reopen it, when a formula has no saved value or the workbook has changed since it was opened. The Mac writes the data into the import script, which holds at most 8 MiB (about a million short values, fewer at full precision); for more, export the worksheet as RDS from File > Export.