Skip to content
Prev 53062 / 63424 Next

can we override "if" in R?

In my case, I create a new type of matrices and override matrix
operations in R for these matrices.
My goal is to make the system as transparent as possible, which means
my system should execute the existing R code without modification.
The problem is that when data is in my own vectors or matrices, "if"
or "while" can't access their values unless we explicitly convert them
into R objects. But this means users need to modify the existing code.
So I hope I can override "if", "while", etc to access data in my own
vectors and matrices directly.
Does this sound reasonable?

Best,
Da

On Sat, Mar 4, 2017 at 3:22 PM, Michael Lawrence
<lawrence.michael at gene.com> wrote: