Description Usage Arguments Details Value Author(s) References Examples
CodeChunkPlayer enables the user to evaluate code chunks interactively.
ConstructDemo constructs a demo function from a file containing code chunks.
1 2 | CodeChunkPlayer(file="")
ConstructDemo(file="")
|
file |
name of rev-, Snw-file or .R-file containing code chunks |
Both functions need a .R-file that has been generated by tangleR.
If the input file is not a .R-file but an rev-file or an Snw-file the input file
will be tangled by tangleR and a .R-file will be generated.
CodeChunkPlayer:
CodeChunkPlayer extracts the code chunks stored in the .R-file and
creates a Tcl/Tk window to show a code chunk selected by the user.
The user can browse through
the set of chunks by clicking on NEXT or bBACK or by typing
the number of a code chunk. The code of the selected code chunk is shown
in the text field of the player window and may be edited. By clicking button
EVALUATE the code will be evaluated and the output occurs on the R console.
ConstructDemo:
ConstructDemo extracts the code chunks of the .R-file and builds a new
function for browsing through the code chunks. This function will contain the code
chunks of the .R-file as well as the logic for browsing and evaluation of selected chunks.
The function is stored with its call in a file whose name is composed
from the name of the input file and the extension .demo.R. Therefore, you can
start the demo function by e.g. source("xyz.demo.R") and
a Tcl/Tk window for code chunk browsing will be created.
This window works like the Tcl/Tk window that is generated by CodeChunkPlayer.
CodeChunkPlayer and ConstructDemo don't have any explicit result.
Hans Peter Wolf
http://www.wiwi.uni-bielefeld.de/com/wolf/software/relax.html
1 2 | ## CodeChunkPlayer()
## ConstructDemo()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.