>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>> On Behalf Of Dan Abner
>> Sent: Monday, June 23, 2014 3:19 PM
>> To: Greg Snow
>> Cc: r-help@r-project.org
>> Subject: Re: [R] Custom sampling method in R
>>
>> Hi Greg,
&
roject.org
> Subject: Re: [R] Custom sampling method in R
>
> Hi Greg,
>
> Thanks, this makes sense. I can envision the call to the sample fn
> like you are discribing. Any ideas on how to construct the vector? I
> still am unclear about that.
>
> Thanks,
>
>
Hi Greg,
Thanks, this makes sense. I can envision the call to the sample fn
like you are discribing. Any ideas on how to construct the vector? I
still am unclear about that.
Thanks,
Dan
On Mon, Jun 23, 2014 at 5:26 PM, Greg Snow <538...@gmail.com> wrote:
> The sample function can be used to sam
The sample function can be used to sample discrete values with
designated probabilities. I would just construct your list of 5
values based on the selected value (duplicating end values if needed,
so a choice of x=0 would be the vector c(0,0,0, 0.125, 0.25) ), then
sample from this vector with the
Hi all,
I have the following situation and a good efficient way to perform
this operation in R has not come to me. Any suggestions/input are
welcome.
I have a user-defined parameter (let's call it x) whose value is
selected from a set of possible values (j). Once the user selects one
of the valu
5 matches
Mail list logo