Skip to content

A suite of productivity tools for R -- debugging, visualization, inline editing, etc.

License

Notifications You must be signed in to change notification settings

robertzk/productivus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

productivus

A suite of productivity tools for R -- debugging, visualization, inline editing, etc.

Debug interactively

Imagine you wrote something like

very_long_expression <- lapply(some_long_list, some_long_function)

You can bring up that expression in your favorite text editor and execute it from R by using the ed function, which matches a regular expression backwards through your R history to find the find instance:

ed("sion <-") # Matches "very_long_expression <- " and will bring up the
 # above code to edit in your favorite editor and execute after editing.

Ruby-like block-accepting functions

Ruby has the notion of passing a "block" to a function: just a bunch of code you wish you could be run within the function, but it should be up to the function to decide how. You can now do this in R.

plus_with_yield <- with_block(function(x, y) { x + y + yield() })
stopifnot(plus_with_yield(1, 2, { 3 + 4 }) == 10)

About

A suite of productivity tools for R -- debugging, visualization, inline editing, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages