Is there any tool or IDE to debug R packages and run them step by step?

I am interested in some R-packages and want to understand how this works, is there any tool to run the method in the package step by step and print the intermediate output?

+5
source share
4 answers

The two previous answers have already told you which base R is, and the add-ons can do.

As for the IDE, you have two options:

ess-tracebug, , :

Documentation:

Default ess-tracebug key bindings:

* Breakpoints:

 b   . Set BP (repeat to cycle BP type) . `ess-bp-set'
 B   . Set conditional BP               . `ess-bp-set-conditional'
 k   . Kill BP                          . `ess-bp-kil'
 K   . Kill all BPs                     . `ess-bp-kill-all'
 t   . Toggle BP state                  . `ess-bp-toggle-state'
 l   . Set logger BP                    . `ess-bp-set-logger'
 C-n . Goto next BP                     . `ess-bp-next'
 C-p . Goto previous BP                 . `ess-bp-previous'

* General Debugging:

 `   . Show R Traceback                     . `ess-show-R-traceback'
 e   . Toggle error action (repeat to cycle). `ess-dbg-toggle-error-action'
 d   . Flag for debugging                   . `ess-dbg-flag-for-debugging'
 u   . Unflag for debugging                 . `ess-dbg-unflag-for-debugging'
 w   . Watch window                         . `ess-watch'

* Navigation to errors (emacs general functionality):

 C-x `, M-g n   . `next-error'
 M-g p          . `previous-error'

* Interactive Debugging:

 c   . Continue                  . `ess-dbg-command-c'
 n   . Next step                 . `ess-dbg-command-n'
 p   . Previous step             . `previous-error'
 q   . Quit debugging            . `ess-dbg-command-Q'
 1..9. Enter recover frame       . `ess-dbg-command-digit'
 0   . Exit recover (also q,n,c) . `ess-dbg-command-digit'

* Input Ring:

 i   . Goto input event marker forwards     . `ess-dbg-goto-input-event-marker'
 I   . Goto input event marker backwards    . `ess-dbg-goto-input-event-marker'

* Misc:
 s   . Source current file  . `ess-tracebug-source-current-file'
 ?   . Show this help       . `ess-tracebug-show-help'
+5

, R debug browser , .

+4

mtrace. Eclipse ( ), Rstudio . , , . .

p.s: - http://www.r-bloggers.com/what-does-this-package-look-like/

+4
source

IDE in Revolution R includes convenient visual debugging functions similar to those contained in MS Visual Studio. Although the software is proprietary and requires a license fee, you can always download the free academic version.

http://www.revolutionanalytics.com/downloads/free-academic.php

+1
source

All Articles