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 -- Ond?ej Mikula Institute of Animal Physiology and Genetics Academy of Sciences of the Czech Republic Veveri 97, 60200 Brno, Czech Republic Institute of Vertebrate Biology Academy of Sciences of the Czech Republic Studenec 122, 67502 Konesin, Czech Republic
R. Michael Weylandt <michael.weylandt@gmail.com>
2012-May-02 16:23 UTC
[R] interactive loop
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:> 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 > > > > -- > Ond?ej Mikula > > Institute of Animal Physiology and Genetics > Academy of Sciences of the Czech Republic > Veveri 97, 60200 Brno, Czech Republic > > Institute of Vertebrate Biology > Academy of Sciences of the Czech Republic > Studenec 122, 67502 Konesin, Czech Republic > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
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:> 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 > > > > ---- Sarah Goslee http://www.functionaldiversity.org