There are two things here. First, the only real rule for overriding functions is that the new value will be passed as a parameter named value , and this will be the last parameter. Therefore, when you specify the signature function(somex, somevalue) , you get the error message unused argument (value = 9) , and the assignment does not work.
Secondly, everything works with the function(x11, value11) due to partial mapping of parameter names in R. Consider this example
f<-function(a, value1234=5) { print(value1234) } f(value=5)
Please note that 5 returned. This behavior is determined by matching arguments in a language definition.
Another way to see what is happening is to print a signature of the call of what is actually called.
'first0<-' <- function(x, value){ print(sys.call()) x[1] <- value x } a <- c(1,2,3) first0(a) <- 5
Thus, the first parameter is actually passed as an unnamed positional parameter, and the new value is passed as the named parameter value= . This is the only parameter name that matters.
source share