Learn R Programming

diffdf (version 1.1.2)

print.diffdf: Print diffdf objects

Description

Print a nicely formatted version of a diffdf object.

Usage

# S3 method for diffdf
print(x, row_limit = 10, as_string = FALSE, file = NULL, ...)

Arguments

x

A comparison object created by diffdf().

row_limit

Maximum number of rows to display in difference tables. Use NULL to show all rows. Default is 10.

as_string

Logical. If TRUE, returns the printed message as an R character vector instead of printing to the console. Default is FALSE.

file

A connection or a character string naming the file to print to. If NULL (the default), output is printed to the console.

...

Additional arguments (not used).

Examples

Run this code
x <- subset(iris, -Species)
x[1, 2] <- 5
COMPARE <- diffdf(iris, x)
print(COMPARE)
print(COMPARE, row_limit = 5)
if (FALSE) {
print(COMPARE, file = "output.txt")
}

Run the code above in your browser using DataLab