Jonathan -
If I understand correctly,
max(0,floor(log(x,10)))
will return the value you want.
- Phil Spector
Statistical Computing Facility
Department of Statistics
Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of David L Lorenz
Sent: Tuesday, December 07, 2010 2:53 PM
To: Jonathan P Daily
Cc: r-help@r-project.org; r-help-boun...@r-project.org
Subject: Re: [R] More elegant magnitude method
Jonathan,
I'd just r
#x27;s the word... imbue it."
- Jubal Early, Firefly
David Winsemius wrote on 12/07/2010 02:50:34 PM:
> [image removed]
>
> Re: [R] More elegant magnitude method
>
> David Winsemius
>
> to:
>
> Jonathan P Daily
>
> 12/07/2010 02:50 PM
>
&
Jonathan,
I'd just return the integer part of the common log:
floor(log10(x))
Dave
From:
Jonathan P Daily
To:
r-help@r-project.org
Date:
12/07/2010 01:44 PM
Subject:
[R] More elegant magnitude method
Sent by:
r-help-boun...@r-project.org
I have a need to find the order of number to
On Dec 7, 2010, at 2:43 PM, Jonathan P Daily wrote:
I have a need to find the order of number to get a scaling parameter
as a
power of 10. I have a function that works *so far*, but it is ugly and
probably buggy. In the interest of avoiding code-based outliers in my
data, I thought I would as
I have a need to find the order of number to get a scaling parameter as a
power of 10. I have a function that works *so far*, but it is ugly and
probably buggy. In the interest of avoiding code-based outliers in my
data, I thought I would ask if anyone here has a better way.
> scl <- function(x
6 matches
Mail list logo