rstudio - using Lattice panel.identify within R-Studio -


i plotting xyplot lattice within r-studio's plot window on mac. in addition interested in lattice's interactive feature panel.identify label data point clicked mouse.

library(lattice)  df= mtcars  xyplot(mpg ~ disp | as.factor(gear),         data= df,        layout = c(1, 3),        type= c("p", "g"),         subscripts= true)  while (!is.null(fp <- trellis.focus(clip.off=f))) {   if (fp$col > 0 & fp$row > 0)   panel.identify(labels = df$qsec) }  

problem: lattice plot done panel.identify function not work properly: switching 1 panel other not recognized. once have chosen specific panel first, panel.identify function recognized clicking on data on panel.

question: - ideas how improve code ?
- r-studio limited handle panel.identify function within it's own plot window ?

i learned myself, behavior described in question regular intended one.

solution switch panels:

you can switch panel hitting esc once, can bring focus panel clicking on it. once have focus on new panel, panel.identify allow select new data. careful switch esc twice, because whole identify loop escaped.

this works in r-studio.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -