Learn R Programming

dynpred (version 0.1.2)

deb: Debugging function

Description

A simple but useful debugging function. It first announces the object to printed and then prints it.

Usage

deb(x, method = c("print", "cat"))

Arguments

x
The object to be printed
method
The method for printing x. Default is "print", which uses print for printing; "cat" uses cat for printing. The latter is useful for short objects (scalar and vectors), the former for more structured objects (data frames, matrices, lists etc).

Examples

Run this code
tm <- c(0.2,0.5,1,1.2,1.8,4)
ta <- 2*tm
dfr <- data.frame(time=tm, stepf=ta)
deb(dfr, method="print")
deb(tm, method="cat")

Run the code above in your browser using DataLab