print.outlieroutputs {outliertree} | R Documentation |
Print outliers in human-readable format
Description
Pretty-prints outliers as output by the 'predict' function from an Outlier Tree model (as generated by function 'outlier.tree'), or by 'extract.training.outliers'. Same as function 'summary'.
Usage
## S3 method for class 'outlieroutputs'
print(x, outliers_print = 15L, min_decimals = 2L, only_these_rows = NULL, ...)
Arguments
x |
Outliers as returned by predict method on an object from 'outlier.tree'. |
outliers_print |
Maximum number of outliers to print. |
min_decimals |
Minimum number of decimals to use when printing numeric values for the flagged outliers. The number of decimals will be dynamically increased according to the relative magnitudes of the values being reported. Ignored when passing 'outliers_print=0' or 'outliers_print=FALSE'. |
only_these_rows |
Specific rows to print (either numbers if the row names in the original data frame were null, or the row names they had if non-null). Pass 'NULL' to print information about potentially all rows |
... |
Not used. |
Value
The same input 'x' that was passed (as 'invisible').
See Also
outlier.tree predict.outliertree
Examples
### Example re-printing results for selected rows
library(outliertree)
data("hypothyroid")
### Fit model
otree <- outlier.tree(hypothyroid,
nthreads=1,
outliers_print=0)
### Store predictions
pred <- predict(otree,
hypothyroid,
outliers_print=0,
return_outliers=TRUE,
nthreads=1)
### Print stored predictions
### Row 531 is an outlier, but 532 is not
print(pred, only_these_rows = c(531, 532))