Thank you. That's easier than I thought.
On Wed, Jan 11, 2012 at 12:06 AM, Jorge I Velez
wrote:
> Hi Robert,
>
> Try
>
> set.seed(123)
> x <- seq(100)
> x <- sample(x, 1000, replace = TRUE)
> f <- ecdf(x)
> f(10)
> # [1] 0.099
> f(71)
> # [1] 0.716
>
> See ?ecdf for more information.
>
> HTH,
> J
Hi Robert,
Try
set.seed(123)
x <- seq(100)
x <- sample(x, 1000, replace = TRUE)
f <- ecdf(x)
f(10)
# [1] 0.099
f(71)
# [1] 0.716
See ?ecdf for more information.
HTH,
Jorge.-
On Tue, Jan 10, 2012 at 11:52 PM, Robert A'gata <> wrote:
> Hello,
>
> I am not sure how to do this in R. Any suggesti
Look at ?ecdf
Michael
On Jan 10, 2012, at 11:52 PM, "Robert A'gata" wrote:
> Hello,
>
> I am not sure how to do this in R. Any suggestion would be
> appreciated. I have a vector of values from where I build an empirical
> CDF. For example:
>
>> x <- seq(1,100)
>> x <- sample(x,1000,replace=T
Hello,
I am not sure how to do this in R. Any suggestion would be
appreciated. I have a vector of values from where I build an empirical
CDF. For example:
> x <- seq(1,100)
> x <- sample(x,1000,replace=T)
> quantile(x,probs=seq(0,1,.05))
0% 5%10%15%20%25%30%35%
4 matches
Mail list logo