Skip to content
Back to formatted view

Raw Message

Message-ID: <CAAmySGONJVyEA0RfGn63EPVYuxHsqrQORsvtLJqdkwppLqo7MQ@mail.gmail.com>
Date: 2011-11-29T22:07:57Z
From: R. Michael Weylandt
Subject: Problem in log
In-Reply-To: <CAK=huh6u_xvpxphqzra6_ZWzT=wAKPmnsUFvM2Eh3JW7AJBVbg@mail.gmail.com>

Do you mean remove the NaNs? Try na.omit() or complete.cases() or many
other options.

If you mean you want the complex log, try

log(as.complex(1-exp(-a)))

Michael

On Tue, Nov 29, 2011 at 5:02 PM, Gyanendra Pokharel
<gyanendra.pokharel at gmail.com> wrote:
> Hi all I have a function of log defined by y = log(1- exp(-a)), when
> exp(-a) is greater, 1, it produce NaN. How can I remove this in R?
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>