[R] how to start R script editor by default
Jim Lemon
jim at bitwrit.com.au
Mon Aug 29 12:46:49 CEST 2011
On 08/29/2011 08:03 PM, SNV Krishna wrote:
> Hi All,
>
> 1) Is it possible to set the options such that R opens a new script editor
> every time I start the R and 2) specify the size of windows.
>
Hi Krishna,
You can start an editor like this:
system("my_editor",wait=FALSE)
where "my_editor" is the name of your favorite editor. Adding this line
to your .First function will start that editor when you start R. Getting
a particular window size depends upon whether you can specify the size
on the command line. Say you're using NEdit. You could do something like
this:
cat("How many rows, Krishna?")
rows<-scan(n=1)
cat("How many columns, Krishna?")
columns<-scan(n=1)
system(
paste("nedit -rows",rows,"-columns",columns,collapse=" "),
wait=FALSE)
Jim
More information about the R-help
mailing list