You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f=function(x){
x
}
f() # Throws error: x is missingg=function(x){
letters[x]
}
g(1) # Returns the first element of letters
g() # Doesn't throw error, returns ALL elements of letters
Hadley Wickham pointed out that g(x) is doing helpfully letters[], which is different from letters[NULL].
ಠ_ಠ
The text was updated successfully, but these errors were encountered:
This burned me a few months back.
Hadley Wickham pointed out that
g(x)
is doing helpfullyletters[]
, which is different fromletters[NULL]
.ಠ_ಠ
The text was updated successfully, but these errors were encountered: