Rgedit logo

Managing Profiles in Rgedit

(c) 2012, Dan Dediu


Table of Contents

    Introduction
    The profile editor

      Introduction

Profiles are introduced in version 0.8 and allow Rgedit to flexibly interact with R or even other command-line interactive programs such as Octave, locally or remotely through, for example, ssh.

Profiles have the following components:

There always is a built-in profile (guaranteed to be always present in any rgedit installation and using a standard R installation) defined as:


Attribute
Value
name built-in
cmd R --no-save --no-restore
local True
default True
setwd setwd(%s)
init-script True
help-type HTML
help-custom-command None
prompt >
prompt-cmd options( prompt="%s" )
continue +
continue-cmd options( continue="%s" )
source-cmd source("%s",echo=TRUE,print.eval=TRUE,max.deparse.length=500000,local=TRUE)
quit-cmd q()
comment #
Below is an example of a profile using a local installation of GNU Octave:


Attribute
Value
name octave
cmd octave
local True
default False
setwd chdir %s
init-script False
help-type Default
help-custom-command None
prompt >
prompt-cmd PS1( "%s" )
continue +
continue-cmd PS2( "%s" )
source-cmd source("%s")
quit-cmd quit
comment #
And, finally, an example of a remote R session thorugh two ssh hops (please note that the hostnames are fictious but this is based on my current remote setup!). For remote sessions is probably advisable to fall back on the text help (no remote browsers), no automatic setwd (as the local and remote paths will be probably different, meaning that the user should be careful to manually change the working directory), and no source (as local temp files are not directly accessible on the remote host, meaning that small pieces of text can be send to the console at any given time):


Attribute
Value
name remote R through chained ssh
cmd ssh -X -t user@host1 ssh -X -t host2 "R --no-save --no-restore"
local False
default False
setwd None
init-script True
help-type Text
help-custom-command None
prompt >
prompt-cmd options( prompt="%s" )
continue +
continue-cmd options( continue="%s" )
source-cmd None
quit-cmd q()
comment #
Thus, the profiles mechanism is quite flexible an can accomodate at least GNU octave (a requested extenssion) and remote sessions (a setup that is probably not uncommon). I'm pretty sure other uses ca be found :)

          The profile editor

Below is a screen shot of the profile editor:

The profile editor

Basically, the profile editor allows the user to edit, delete or add profiles using a simple GUI.
Add profile

Please note some conventions:

Back to the main help page.