Skip to content
Prev 247224 / 398503 Next

Method dispatch for function call operator?

Thank you both for very helpful answers. I have indeed missed the help pages
about "(" and now the situation is more clear.
Unfortunately, it won't work as assignment function form treats the first
argument specially. My intention was to create syntactic sugar like

x$metadata(condition) <- newvalue

instead of 

x$setMetadata(condition, value=newvalue)

I know that

metadata(x, condition) <- newvalue 

would work, but I would like to avoid that particular syntax for a number of
reasons.

Well, you can't have everything, I guess. I'll just stick to the []
operator.

Thanks again for the clarification!