Was this page helpful?

The radR console window

From $1

    The radR console window allows you to submit expressions to the R interpreter.  You can use this to examine radR variables and to copy/paste
    scripts into radR, even while radR is "playing".

    console_window (1).png

    The  "> " printed on a cyan background is the prompt

    Special keys
    • Enter: submit the current input region to R.  The input region is all text between the previous prompt (or the start of the window) and the next prompt (or the end of the window).
    • Shift-Enter: move to the next line without submitting the input region to R.  This lets you type a multi-line statement such as the definition of f in the image above.
    • Home: move to the start of the (possibly multi-line) input region.
    • End: move to the end of the (possibly multi-line) input region.
    • Up: move to the previous input region.  However, if the cursor is immediately after the last prompt, then retrieve the previous line from the input history (i.e. the set of inputs you have typed previously).
    • Down: move to the next input region. However, if the cursor is immediately after the last prompt, then retrieve the next line from the input history.
    • Escape: if you retrieve a line from the input history and make changes to it, this key will undo all the changes

    Miscellaneous features
    • you can delete a prompt, but you must delete the whole prompt string.  If any cyan text remains, it is treated as a prompt.
    • you can paste a multi-line entry from the clipboard.  (You must hit Enter to submit it.)
    • if you retrieve input from the history and change it, then those changes are saved in the history if you use Up or Down to retrieve a different line.
    • if an input is identical to the previous one in the history, it is not added to the history
    Customizing  the console

    These variables, found in radR/gui/gui.conf.R, can be used to change the appearance and behaviour of the console:

    • console.prompt.string: what text is printed for a prompt.  This text is not treated as part of your input.

    • console.line.width: how wide (in characters) should the console be?

    • console.history.max.length: how many inputs should be preserved in the history?  The history is saved if you quit radR and choose to "Save parameters and GUI configuration".

    • console.style: this is a list whose names are possible types of text in the console window, and whose values are Tk options for the text colour, font, etc.  To delve into the options, visit the Tk manual page for the "text" widget.


    Was this page helpful?
    Tags: (Edit tags)
    • No tags
    FileSizeDateAttached by 
     console_window (1).png
    No description
    10.76 kB20:34, 6 Mar 2009JohnActions
    Comments (0)

    Powered by MindTouch Core