On 2014-09-16 10:50, PIKAL Petr wrote:

switch(menu(c("List letters", "List LETTERS")) + 1,
      cat("Nothing done\n"), letters, LETTERS)

why is the result changed if ' + 1,' removed?

Because +1 belongs to switch not to menu. You can translate above to:


The help pages ?switch, ?menu do not describe (in my eyes! :) ) the significance of '+ 1'; where is this described in more detail please?

______________________________________________
R-help@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.

Reply via email to