From m@rc_@chw@rtz @end|ng |rom me@com  Mon Aug  8 19:13:06 2022
From: m@rc_@chw@rtz @end|ng |rom me@com (Marc Schwartz)
Date: Mon, 8 Aug 2022 13:13:06 -0400
Subject: [Rd] 
 =?utf-8?q?Is_the_behaviour_of_sample=27s_prob_=3D_NULL_defa?=
 =?utf-8?q?ult_argument_undocumented=3F?=
In-Reply-To: <LO2P123MB1920AE1680B3BDB0AD2F102F8A639@LO2P123MB1920.GBRP123.PROD.OUTLOOK.COM>
References: <LO2P123MB1920AE1680B3BDB0AD2F102F8A639@LO2P123MB1920.GBRP123.PROD.OUTLOOK.COM>
Message-ID: <etPan.62f14422.4d6fca3f.2622@me.com>

Hi,

In the Details section of ?sample, the 6th paragraph begins with the following sentence:

"The optional prob argument can be used to give a vector of weights for obtaining the elements of the vector being sampled."

Since the argument is optional, it would imply that the default behavior is for an equal weighting of the elements in the source vector.

Regards,

Marc Schwartz


On August 8, 2022 at 12:51:28 PM, Reece Goding (reece.goding at outlook.com (mailto:reece.goding at outlook.com)) wrote:

> Hello,
>
> Does the documentation for sample never say what happens if you leave the prob argument NULL?
>
> This might be a job for R-help, but pride has me hoping that I'm missing something very technical rather than very obvious.
>
> Thanks,
> Reece Goding
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] =?utf-8?q?Is_the_behaviour_of_sample=27s_prob_=3D_NULL_defa?= =?utf-8?q?ult_argument_undocumented=3F?=
Marc Schwartz