Skip to content
Back to formatted view

Raw Message

Message-ID: <CAHjr2U8O6TEZP=5Ng-UONOG07RYnwL7L6yC64MunxWYJ+O3+iQ@mail.gmail.com>
Date: 2011-12-04T00:40:54Z
From: Pierre Lapointe
Subject: function for x to the power of y
In-Reply-To: <CAEDoPAGGC7vOMVzvGLnqrAwM5VRfg=WZU2TxNO9AMwoJcUw04g@mail.gmail.com>

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.