What does “not run” mean in R help pages?

后端 未结 5 1527
抹茶落季
抹茶落季 2020-12-02 09:47

Sometimes on an R help page the phrase \"not run\" appears in comments. Check out this from the help page for \"with()\":

Examples
require(stats); require(gr         


        
5条回答
  •  孤城傲影
    2020-12-02 10:17

    The canonical example here might be in the help page for rm:

    ## Not run: 
    ## remove (almost) everything in the working environment.
    ## You will get no warning, so don't do this unless you are really sure.
    rm(list = ls())
    
    ## End(Not run)
    

    If this ran it would of course have undesired effects.

提交回复
热议问题