Skip to content

interactive loop

5 messages · Ondřej Mikula, michael.weylandt at gmail.com (R. Michael Weylandt, Sarah Goslee

#
Dear R-helpers,
I have a number of point configurations representing skull shapes, but
some of them contain superfluous points. I want to write a loop in
which each configuration is plotted and I am asked to write the
numbers of points that are superfluous. However, I don't know how to
introduce this interactive element.
Would you give me an advice?
Best regards
Ond?ej Mikula
I think readline() will do what you want. It can display a message and take user input, assigning it to a character value so you might need as.numeric()

Michael
On May 2, 2012, at 12:08 PM, Ond?ej Mikula <onmikula at gmail.com> wrote:

            
#
You might start with par(ask=TRUE) and identify().

A reproducible example might get you actual code. Also, how do you
know they're superfluous? Perhaps that knowledge can be used to
automate identification.

Sarah
On Wed, May 2, 2012 at 12:08 PM, Ond?ej Mikula <onmikula at gmail.com> wrote:

  
    
#
And now we have two entirely different interpretations of the question.

I think Ond?ej needs to provide a more detailed explanation of the
problem and intended result.

Sarah

On Wed, May 2, 2012 at 12:23 PM, R. Michael Weylandt
<michael.weylandt at gmail.com> <michael.weylandt at gmail.com> wrote:

  
    
#
Dear Michael and Sarah,
the superfluous points arose as an error (e.g. double-click) in the
measurement process. Thus, looking on the image I recognize them
easily and everything what I need is to write their numbers.
readline() serves well for that purpose. Thanks a lot!
Ond?ej
On 2 May 2012 18:32, Sarah Goslee <sarah.goslee at gmail.com> wrote: