?if
help(if) (or other control control structures aside from if) gives the same non-result, unless quoted (as noted). A related error occurs with apropos(if)---it returns a syntax error. The version is: This version: Version 1.01 Requires: R 2.0.1 (2004-11-15) Framework Version
On 12-Feb-05, at 5:40 PM, Byron Ellis wrote:
Actually there is help for control structures, help("if") works just
fine. The problem is ? is that R's parser treats ? as an operator with
unary and binary forms when, in fact, its not really an operator.
?if(TRUE) TRUE (any valid IF construct) will also give the help for
'if'. This is true for all platforms and probably has something to do
with the fact that while "if" is bound directly to a primitive (
"if"(runif(1) < 0.5,TRUE,FALSE) is equivalent to if(runif(1) < 0.5)
TRUE else FALSE) , the if bareword gets special handling in the
parser.
On Feb 12, 2005, at 4:33 PM, Rob J Goedman wrote:
John, Just to make sure, which configuration are you using? Assuming the GUI (otherwise you would see a "+" instead of the ">" prompt), which version of the R.app are you using? The creation date listed in Finder will do. I think you noticed 2 issues. Right now, there is no ? help for control structures. You have to go to the language reference manual. Secondly, newer versions of R.app (just the GUI part, as released by Simon on http://www.rosuda.org/R/nightly/ ) will tell you if there is no help for the requested topic. Hope this helps, Rob On Feb 12, 2005, at 1:22 PM, Dr. John R. Vokey wrote:
? followed by any of the condition statements (or help() containing the condition statement) does nothing (i.e., the help window fails to open), but the line is parsed in that the prompt `>' is returned. Is this a parsing error in the help function, or (more likely) have I missed some deep R construct? -- John -- John R. Vokey, PhD Professor B.E.R.G. - Behaviour and Evolution Research Group Micro-Cognition Laboratory Department of Psychology & Neuroscience University of Lethbridge Lethbridge, Alberta T1K 3M4 CANADA
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
--- Byron Ellis (ellis@stat.harvard.edu) "Oook" -- The Librarian
-- John R. Vokey, PhD Professor B.E.R.G. - Behaviour and Evolution Research Group Micro-Cognition Laboratory Department of Psychology & Neuroscience University of Lethbridge Lethbridge, Alberta T1K 3M4 CANADA