[R] tkinsert

Jarimatti Valkonen javalkon at hytti.uku.fi
Sat Aug 12 12:07:19 CEST 2006

claude.josse wrote:
 > But in my text window I have :
 > x=2a=mean(c(1,2,3))
 > I d'like to have something like:
 > x=2
 > a=mean(c(1,2,3))

AFAIK you need to separate lines with a newline character ('\n').
Put a 'tkinsert(txt, "end", "\n")' between the insert commands. Or
append each line with '\n'.

 > 2)My second problem,

In function run:
 >    print(eval(e))

Make the evaluation in the workspace environment:
print(eval(e, envir=.GlobalEnv))

Then the results are available in R console.


Jarimatti Valkonen

More information about the R-help mailing list