microbenchmark (version 1.4.9)

print.microbenchmark: Print microbenchmark timings.

Description

Print microbenchmark timings.

Usage

# S3 method for microbenchmark
print(x, unit, order, signif, ...)

Arguments

x

An object of class microbenchmark.

unit

What unit to print the timings in. Default value taken from to option microbenchmark.unit (see example).

order

If present, order results according to this column of the output.

signif

If present, limit the number of significant digits shown.

...

Passed to print.data.frame

See Also

boxplot.microbenchmark and autoplot.microbenchmark for a plot methods.

Examples

Run this code
# NOT RUN {
a1 <- a2 <- a3 <- a4 <- numeric(0)

res <- microbenchmark(a1 <- c(a1, 1),
                      a2 <- append(a2, 1),
                      a3[length(a3) + 1] <- 1,
                      a4[[length(a4) + 1]] <- 1,
                      times=100L)
print(res)
## Change default unit to relative runtime
options(microbenchmark.unit="relative")
print(res)
## Change default unit to evaluations per second
options(microbenchmark.unit="eps")
print(res)

# }

Run the code above in your browser using DataCamp Workspace