Getting help on the R command line window

I wanted help about repeating in the command prompt window R. But

> ?repeat + > help(repeat) Error: unexpected ')' in "help(repeat)" 

repeat is different from other functions. Also I found even if, I also can not get the reference document. So, I suppose that help is only needed for function / control without control? How to get a reference document on flow control commands?

Thanks!

+7
r
source share
2 answers

repeat , for etc. are parts of a language that the parser gives high priority to in this case, R thinks that you are going to write something that he needed to evaluate before calling the function ?() as a result. The canonical solution is to specify the name of the function using backlinks:

 ?`repeat` 

As DWin notes above, this can be used for any function name. Backticks are also useful for quoting objects or components of lists / data frames that have non-standard names.

+7
source share

help ("repeat")

? Repeat

+6
source share

All Articles