icecream-package {icecream} | R Documentation |
Icecream: Never use print()
to debug again
Description
Icecream provides a more user-friendly print debugging experience. Use ic()
wherever you would
use print()
and see the expression and its value easily.
Options
The following options can be used to control behaviour:
-
icecream.enabled
: Boolean. IfFALSE
, calls toic(foo)
simply evaluate and returnfoo
. No output is printed. -
icecream.prefix
: This is printed at the beginning of every line. Defaults to"ic|"
. -
icecream.include.context
: Boolean. IfTRUE
, when callingic(foo)
the source file:line or environment will be printed along with the expression and value. This can be useful for more complicated debugging but produces a lot of output so is disabled by default. Whenic()
is called with no arguments, the context is always printed because showing the location of the call is the only reason to callic()
on its own. -
icecream.peeking.function
: indicates the function that summarizes the object. Default value isic_autopeek
, which works likeutils::str
for most of the time, but gives more informative output forlists
,data.frames
and their subclasses in a more compact way. -
icecream.max.lines
Integer. Determines maximum number of lines that the peek of an object occupies; defaults to 1. -
icecream.output.function
: Not implemented yet. See the configuration section of the original project docs for details of what it will do. -
icecream.arg.to.string.function
: Not implemented yet. See the configuration section of the original project docs for details of what it will do.
Author(s)
Maintainer: Lewin Appleton-Fox lewin.a.f@gmail.com
Authors:
Dominik Rafacz dominikrafacz@gmail.com (ORCID)
Other contributors:
Ben Stiles [contributor]
See Also
Useful links:
Report bugs at https://github.com/lewinfox/icecream/issues