# Compute Randomly Drawn Wilcoxon Rank Sum Density in R Programming – rwilcox() Function

`rwilcox()` function in R Language is used to compute random density for Wilcoxon Rank Sum Statistic Distribution over a sequence of random Numeric values.

Syntax: rwilcox(N, m, n)

Parameters:
N: Size of Random Vector
m: Larger sample size
n: Smaller sample size

Example 1:

 `# R Program to compute random ` `# Wilcoxonrank Sum Density ` ` `  `# Setting seed for ` `# random number generation ` `set``.seed(``1000``) ` ` `  `# Set Vector size ` `N <``-` `20` ` `  `# Calling rwilcox() Function ` `y <``-` `rwilcox(N, m ``=` `10``, n ``=` `5``) ` `y `

Output:

```  18 21 30 32 12 32 21 24 33 24 26 35 18 27 29 21 13 15 26 31
```

Example 2:

 `# R Program to compute random ` `# Wilcoxonrank Sum Density ` ` `  `# Setting seed for ` `# random number generation ` `set``.seed(``1000``) ` ` `  `# Set Vector size ` `N <``-` `100` ` `  `# Calling rwilcox() Function ` `y <``-` `rwilcox(N, m ``=` `40``, n ``=` `10``) ` ` `  `# Plot a graph ` `plot(y) `

Output: My Personal Notes arrow_drop_up Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.