R equivalent of Python 'pass' statement

Chris_Rands

Python has a pass statement, a null operation, which can be a useful placeholder before code is complete, for example in Python:

def example_function():
    pass
    # stuff to do here

Is there an equivalent in R? Thank you.

Spacedman

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")
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Is there a javascript equivalent for the python pass statement that does nothing?

From Dev

Is there a JavaScript equivalent of the Python pass statement that does nothing?

From Dev

Matlab equivalent of Python's "pass" statement

From Dev

Equivalent of Python's Pass in Scala

From Java

python equivalent of R table

From Dev

Python equivalent of the R operator "%in%"

From Dev

Equivalent of source() of R in Python

From Dev

Equivalent of "table" of R in python

From Dev

Pass R variable to a sql statement

From Java

Python's equivalent of && (logical-and) in an if-statement

From Dev

python equivalent of MATLAB statement A(B==1)= C

From Dev

is there a pass statement in Lua like in python

From Dev

R dcast equivalent in python pandas

From Dev

Equivalent of R's createDataPartition in Python

From Dev

Python equivalent of R "split"-function

From Dev

R equivalent to the Python function "dir"?

From Dev

Equivalent of R's removeSparseTerms in Python

From Dev

Difference between pass statement and 3 dots(...) in python

From Dev

using pass in if statement in lambda function python

From Dev

Is Python *with* statement exactly equivalent to a try - (except) - finally block?

From Dev

Is it best practice to include an else: pass statement at the end of a Python if or if/elif statement?

From Dev

Is it best practice to include an else: pass statement at the end of a Python if or if/elif statement?

From Dev

What would the batch equivalent of Python's "pass" argument be?

From Dev

Equivalent of R rbind.fill in Python Pandas

From Dev

Is there a Python equivalent to R's sample() function?

From Dev

Python equivalent for R's 'zoo' package

From Dev

Equivalent of transform in R/ddply in Python/pandas?

From Dev

Python equivalent of daisy() in the cluster package of R

From Dev

equivalent of R's View for Python's pandas

Related Related

  1. 1

    Is there a javascript equivalent for the python pass statement that does nothing?

  2. 2

    Is there a JavaScript equivalent of the Python pass statement that does nothing?

  3. 3

    Matlab equivalent of Python's "pass" statement

  4. 4

    Equivalent of Python's Pass in Scala

  5. 5

    python equivalent of R table

  6. 6

    Python equivalent of the R operator "%in%"

  7. 7

    Equivalent of source() of R in Python

  8. 8

    Equivalent of "table" of R in python

  9. 9

    Pass R variable to a sql statement

  10. 10

    Python's equivalent of && (logical-and) in an if-statement

  11. 11

    python equivalent of MATLAB statement A(B==1)= C

  12. 12

    is there a pass statement in Lua like in python

  13. 13

    R dcast equivalent in python pandas

  14. 14

    Equivalent of R's createDataPartition in Python

  15. 15

    Python equivalent of R "split"-function

  16. 16

    R equivalent to the Python function "dir"?

  17. 17

    Equivalent of R's removeSparseTerms in Python

  18. 18

    Difference between pass statement and 3 dots(...) in python

  19. 19

    using pass in if statement in lambda function python

  20. 20

    Is Python *with* statement exactly equivalent to a try - (except) - finally block?

  21. 21

    Is it best practice to include an else: pass statement at the end of a Python if or if/elif statement?

  22. 22

    Is it best practice to include an else: pass statement at the end of a Python if or if/elif statement?

  23. 23

    What would the batch equivalent of Python's "pass" argument be?

  24. 24

    Equivalent of R rbind.fill in Python Pandas

  25. 25

    Is there a Python equivalent to R's sample() function?

  26. 26

    Python equivalent for R's 'zoo' package

  27. 27

    Equivalent of transform in R/ddply in Python/pandas?

  28. 28

    Python equivalent of daisy() in the cluster package of R

  29. 29

    equivalent of R's View for Python's pandas

HotTag

Archive