AllObs
is used to display all of the observations in a dataset.
It generates a (usually undisplayed) factor with a different level for each observation,
sets a function to display the value, and calls DropEmpty
to suppress display of empty rows, columns or cells.
If the within
argument is specified in AllObs
, the
factor levels are restarted within each grouping. (within
is interpreted as the INDEX
argument of tapply
,
with one exception described below.) This may be useful when
displaying the observation number, and is definitely useful
if AllObs
is used as a column specification in the table.
It will also save some computation time if the table is very
large, since fewer factor levels will be generated and
later dropped.
RowNum
is unlikely to be useful in a table by itself,
but is helpful when displaying large datasets with AllObs
.
It allows a large number of observations to be broken into
several rows and columns.
Because RowNum
affects both rows and
columns, its use is somewhat unusual. Normally it should be called
before calling tabular
, and its result saved in a
variable. That variable (e.g. rownum
) is used in the
row specification for the table wrapped in I()
, and
in the column specification of the table in the within
argument to AllObs
. (This is the exception mentioned above.)
Despite its name, RowNum
can be used as a column specifier,
if you'd prefer column-major ordering of the values displayed
in the table.