How it works...

As we saw in the preceding demonstration, the sample function can generate random samples from a specified population. The returned number from records can be designated by the user simply by specifying the argument of size. By assigning the replace argument as TRUE, you can generate Bernoulli trials (a population with 0 and 1 only).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset