R equivalent of Python 'pass' statement

Just have an empty function body:

foo = function(){
 }

You should probably also add a comment, and a warning maybe?

foo = function(){
# write this tomorrow
 warning("You ran foo and I havent written it yet")
}

Same thing with an if expression:

if(x==1){
  # do this bit later
  }else{
  message("x isnt 1")
}

If you don't want NULL returned,and you don't want to wrap your function call with invisible(), you can include invisible() inside of the function body. This returns nothing:

my_func  <- function(x){
  invisible()
}
my_func(100)

Tags:

R