Message-ID: <c1c$VNA41pX7EwcF@myatt.demon.co.uk>
Date: 2001-07-25T10:20:40Z
From: Mark Myatt
Subject: evaluating keystroke
In-Reply-To: <Pine.SOL.4.33.0107241704001.7951-100000@julius.ling.ohio-state.edu>
David White <dwhite at 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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._