A head
-method will return the first rows of the data.table
in
the stat
-slot. Use argument n
to specify the number of rows.
A tail
-method will return the last rows of the data.table
in
the stat
-slot. Use argument n
to specify the number of rows.
The methods dim
, nrow
and ncol
will return information
on the dimensions, the number of rows, or the number of columns of the
data.table
in the stat
-slot, respectively.
Objects derived from the textstat
class can be indexed with simple
square brackets ("[") to get rows specified by an numeric/integer vector,
and with double square brackets ("[[") to get specific columns from the
data.table
in the slot stat
.
The colnames
-method will return the column names of the data-table
in the slot stat
.
The methods as.data.table
, and as.data.frame
will extract the
data.table
in the slot stat
as a data.table
, or
data.frame
, respectively.
textstat
objects can have a name, which can be retrieved, and set using
the name
-method and name<-
, respectively.
The round()
-method looks up all numeric columns in the
data.table
in the stat
-slot of the textstat
object and
rounds values of these columns to the number of decimal places specified by
argument digits
.
The format()
-method returns a pretty-printed and minimized
version of the data.table
in the stat
-slot of the
textstat
-object: It will round all numeric columns to the number of decimal
numbers specified by digits
, and drop all columns with token ids. The
return value is a data.table
.