From: Mark Myatt (mark@myatt.demon.co.uk)
Date: Wed 25 Jul 2001 - 20:20:40 EST
Message-id: <c1c$VNA41pX7EwcF@myatt.demon.co.uk>
David White <dwhite@ling.ohio-state.edu> writes:
>
>On the question of evaluating keystrokes:
>
>I often plot subsets of data to get a sense of what I'm looking for. I
>generally run a for loop with the specification par(ask=TRUE) after each
>plot command, so that I can take time to look over the data before going
>on to the next plot by pressing RETURN.B
>
>Would it be possible to use readline() in such a command sequence to write
>a comment about each plot before going on to the next? This would
>certainly help me take quicker and better notes when examining data, and
>might even allow me to use R in a perception/classification experiment.
Something like:
comments <- vector(mode = "character")
data(volcano)
for(i in 1:(dim(volcano)[2] - 1))
{
plot(volcano[ ,i], volcano[ ,i+1], main = paste("Plot ", i))
comments[i] <- readline("Comments : ")
}
Should do the trick.
Mark
-- Mark Myatt-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.1.3 : Wed 10 Mar 2004 - 08:18:21 EST