Displaying 13 results from an estimated 13 matches for "col1_iqr".
Did you mean:
col1_myiqr
2016 Apr 19
0
Interquartile Range
...mething
that might "work" for you:
library(plyr)
data <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14))
myIqr <- function(x) {
paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
}
ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
col1_IQR=stats::IQR(col1))
# groupColumn col1_myIqr col1_IQR
#1 1 1-1 0
#2 2 2-4 1
#3 3 12-24 12
#4 4 112-320 208
#5 5 2048-8192 6144
The important point is that
paste(round(quantile(x,0.25),0),...
2016 Apr 19
1
Interquartile Range
...:
>
> library(plyr)
>
> data <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14))
> myIqr <- function(x) {
> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
> }
> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
> col1_IQR=stats::IQR(col1))
> # groupColumn col1_myIqr col1_IQR
> #1 1 1-1 0
> #2 2 2-4 1
> #3 3 12-24 12
> #4 4 112-320 208
> #5 5 2048-8192 6144
>
> The important point is th...
2016 Apr 19
2
Interquartile Range
...:
>
> library(plyr)
>
> data <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14))
> myIqr <- function(x) {
> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
> }
> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
> col1_IQR=stats::IQR(col1))
> # groupColumn col1_myIqr col1_IQR
> #1 1 1-1 0
> #2 2 2-4 1
> #3 3 12-24 12
> #4 4 112-320 208
> #5 5 2048-8192 6144
>
> The important point is th...
2016 Apr 19
2
Interquartile Range
...ta <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14))
>>> myIqr <- function(x) {
>>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>>> }
>>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>>> col1_IQR=stats::IQR(col1))
>>> # groupColumn col1_myIqr col1_IQR
>>> #1 1 1-1 0
>>> #2 2 2-4 1
>>> #3 3 12-24 12
>>> #4 4 112-320 208
>>> #5 5 2048-8...
2016 Apr 19
0
Interquartile Range
...gt;>
>> data <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14))
>> myIqr <- function(x) {
>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>> }
>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>> col1_IQR=stats::IQR(col1))
>> # groupColumn col1_myIqr col1_IQR
>> #1 1 1-1 0
>> #2 2 2-4 1
>> #3 3 12-24 12
>> #4 4 112-320 208
>> #5 5 2048-8192 6144
>>
&g...
2016 Apr 19
5
Interquartile Range
That didn't work Jim!
Thanks anyway
On Mon, Apr 18, 2016 at 9:02 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Michael,
> At a guess, try this:
>
> iqr<-function(x) {
> return(paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
> }
>
> .col3_Range=iqr(datat$tenure)
>
> Jim
>
>
>
> On Tue, Apr 19, 2016 at
2016 Apr 19
2
Interquartile Range
...1=2^(0:14))
>> >>> myIqr <- function(x) {
>> >>>
>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>> >>> }
>> >>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>> >>> col1_IQR=stats::IQR(col1))
>> >>> # groupColumn col1_myIqr col1_IQR
>> >>> #1 1 1-1 0
>> >>> #2 2 2-4 1
>> >>> #3 3 12-24 12
>> >>> #4 4 112-320...
2016 Apr 19
0
Interquartile Range
...Column=rep(1:5,1:5), col1=2^(0:14))
> >>> myIqr <- function(x) {
> >>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
> >>> }
> >>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
> >>> col1_IQR=stats::IQR(col1))
> >>> # groupColumn col1_myIqr col1_IQR
> >>> #1 1 1-1 0
> >>> #2 2 2-4 1
> >>> #3 3 12-24 12
> >>> #4 4 112-320 208
> >&g...
2016 Apr 19
0
Interquartile Range
...>>> myIqr <- function(x) {
>>> >>>
>>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>>> >>> }
>>> >>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>>> >>> col1_IQR=stats::IQR(col1))
>>> >>> # groupColumn col1_myIqr col1_IQR
>>> >>> #1 1 1-1 0
>>> >>> #2 2 2-4 1
>>> >>> #3 3 12-24 12
>>> >>> #4...
2016 Apr 20
2
Interquartile Range
...on(x) {
>>>> >>>
>>>> >>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>>>> >>> }
>>>> >>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>>>> >>> col1_IQR=stats::IQR(col1))
>>>> >>> # groupColumn col1_myIqr col1_IQR
>>>> >>> #1 1 1-1 0
>>>> >>> #2 2 2-4 1
>>>> >>> #3 3 12-24 12
>>>>...
2016 Apr 20
0
Interquartile Range
...t;>>>>>>
>>>>>>>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>>>>>>>> }
>>>>>>>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>>>>>>>> col1_IQR=stats::IQR(col1))
>>>>>>>> # groupColumn col1_myIqr col1_IQR
>>>>>>>> #1 1 1-1 0
>>>>>>>> #2 2 2-4 1
>>>>>>>> #3 3 12-24 12
>>&...
2016 Apr 20
2
Interquartile Range
...gt;>
> >>>>>>>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
> >>>>>>>> }
> >>>>>>>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
> >>>>>>>> col1_IQR=stats::IQR(col1))
> >>>>>>>> # groupColumn col1_myIqr col1_IQR
> >>>>>>>> #1 1 1-1 0
> >>>>>>>> #2 2 2-4 1
> >>>>>>>> #3 3 12-2...
2016 Apr 20
0
Interquartile Range
...>>>>>>>> paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")
>> >>>>>>>> }
>> >>>>>>>> ddply(data, ~groupColumn, summarise, col1_myIqr=myIqr(col1),
>> >>>>>>>> col1_IQR=stats::IQR(col1))
>> >>>>>>>> # groupColumn col1_myIqr col1_IQR
>> >>>>>>>> #1 1 1-1 0
>> >>>>>>>> #2 2 2-4 1
>> >>>>>>>> #3...