Skip to content

Commit

Permalink
# Please include a useful commit message! jr
Browse files Browse the repository at this point in the history
  • Loading branch information
jimrothstein committed Nov 20, 2024
1 parent 734688d commit 312333a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions BASE/340_missing_getArg.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## file <- "340_missing_getArg_
## Turn off Diagnostics in Global | Code | Diagnositcs

# suppose
f = function(x,y) {
if (missing(y)) print("y has no value ")
}

g = function(x,y, ...) {
if (missing(y)) print("y has no value ")
}

## f, g same EXCEPT for
f(x=1, y=2, z=3) # R sees unused argument, throws error


#
g(x=1, y=2, z=3) # R allows

0 comments on commit 312333a

Please sign in to comment.