[R] User input after opening graphing device

Duncan Murdoch murdoch.duncan at gmail.com
Fri Nov 12 16:58:56 CET 2010


On 12/11/2010 8:58 AM, Jan Eitel wrote:
> Bert Gunter<gunter.berton<at>  gene.com>  writes:
>
> >
> >  PLEASE follow the posting guide and give us the output of sessionInfo().
> >
> >  I was unable to duplicate your problem -- it worked fine for me.
> >
> >  >  sessionInfo()
> >  R version 2.12.0 (2010-10-15)
> >  Platform: i386-pc-mingw32/i386 (32-bit)
> >
> >  locale:
> >  [1] LC_COLLATE=English_United States.1252
> >  [2] LC_CTYPE=English_United States.1252
> >  [3] LC_MONETARY=English_United States.1252
> >  [4] LC_NUMERIC=C
> >  [5] LC_TIME=English_United States.1252
> >
> >  attached base packages:
> >   [1] datasets  splines   grid      tcltk     stats     graphics  grDevices
> >   [8] utils     methods   base
> >
> >  other attached packages:
> >  [1] TinnR_1.0.3     R2HTML_2.2      Hmisc_3.8-3     survival_2.35-8
> >  [5] svSocket_0.9-48 lattice_0.19-13 MASS_7.3-8
> >
> >  loaded via a namespace (and not attached):
> >  [1] cluster_1.13.1 svMisc_0.9-60  tools_2.12.0
>
>
>
>
> It works if you run it line by line. However, if you copy and paste all
> following six lines into R:
>
> windows()
> bringToTop(-1)
> interactive()
> run<- readline(prompt = "Continue (Yes = 1, No = 2):")
> dummy<- 1
> run
>
>
> it does not allow user input (e.g. it does not prompt you "Continue (Yes = 1,
> No = 2):").


Sure it does, and then you type "dummy <- 1", and that satisfies it.  
Cutting and pasting is all interpreted as typing.  (How else could it 
work???)

If you want the interactivity, you can use source("clipboard").

Duncan Murdoch



More information about the R-help mailing list