Skip to content
Prev 360242 / 398503 Next

Interquartile Range

To be precise:

paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-")

is an expression that evaluates to a character string:
"round(quantile(x,.25),0) - round(quantile(x,0.75),0)"

no matter what the argument of your function, x. Hence

return(paste(...)) will return this exact character string and never
evaluates x.


Cheers,
Bert








Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Apr 19, 2016 at 8:34 AM, William Dunlap via R-help
<r-help at r-project.org> wrote: