[R] Matlab to R

Annabel rmails at quantanalysis.in
Tue Aug 9 06:39:20 CEST 2011


I am trying to convert a matlab code to R.
Most of the conversion statements are simple, but problem is with return.

Since it's a recursive function it's a bit complicated. Anyway in matlab
we can have return statment like

[price, notional] = functionname()

and also for the same function...

notional(1) = functionname()

how to do this in R? i have tried using data frame but still getting errors!
Yes the functioname() function is recursive...but am guessing it shouldn't
matter.

also there is no "return" statement in MatLab.......so finding it a bit
confusing.



More information about the R-help mailing list