[R-SIG-Finance] function for x to the power of y

Pierre Lapointe pierrelap at gmail.com
Sun Dec 4 01:40:54 CET 2011


What's wrong with x^y?

Example:
> 2^4
[1] 16

On Sat, Dec 3, 2011 at 1:40 PM, Samit Jain <sjain at caa.columbia.edu> wrote:
> You can write a simple function
>
> pow = function(x,y) { x^y }
>
> On Sat, Dec 3, 2011 at 1:23 PM, Jun Zhu <junzhu98 at yahoo.com> wrote:
>
>> Hi,
>> Does R has a mathematical function to calculate
>> x to the power of y
>>
>> thanks,
>> Jun
>>        [[alternative HTML version deleted]]
>>
>>
>> _______________________________________________
>> R-SIG-Finance at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list