Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use sample function to realize Random sampling in R language

Shulou Source: shulou.com Published: 2022-06-01 03:10:41 10月05日 Update

This article will explain in detail how to use sample function to achieve random sampling in R language. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Using sample function to realize random sampling sample (x, size, replace = FALSE, prob = NULL)

The first parameter x: the extracted vector

The second parameter size: the number of decimates

The third parameter replace: whether it is put back, it will not be put back by default.

Vec

Tags: Sampling parameters functions articles language vectors more extraction good practical three number content size article time knowledge length reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Redmi Shulou Information Shulou Technology vpn