# Compute Cumulative Cauchy Density in R Programming – pcauchy() Function

`pcauchy()` function in R Language is used to calculate the cumulative cauchy density. It also creates a density plot of cauchy cumulative distribution.

Syntax: pcauchy(vec, scale)

Parameters:
vec: x-values for cauchy function
scale: Scale for plotting

Example 1:

 `# R Program to compute cumulative cauchy density ` ` `  `# Creating vector for x-values ` `x <``-` `seq(``0``, ``2``, by ``=` `0.2``) ` ` `  `# Apply pcauchy() Function ` `y <``-` `pcauchy(x, scale ``=` `5``) ` `y `

Output:

```  0.5000000 0.5127256 0.5254107 0.5380154 0.5505015 0.5628330 0.5749763
 0.5869014 0.5985815 0.6099938 0.6211189
```

Example 2:

 `# R Program to compute cumulative cauchy density ` ` `  `# Creating vector for x-values ` `x <``-` `seq(``0``, ``2``, by ``=` `0.2``) ` ` `  `# Apply pcauchy() Function ` `y <``-` `pcauchy(x, scale ``=` `5``) ` ` `  `# Plotting 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.