Compute the value of Cauchy Quantile Function in R Programming – qcauchy() Function

qcauchy() function in R Language is used to calculate the value of cauchy quantile function. It also creates a density plot of cauchy quantile function.

Syntax: qcauchy(vec, scale)

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

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

# R Program to compute value of
# cauchy quantile function
  
# Creating vector for x-values
x <- seq(0, 1, by = 0.2)
  
# Apply qcauchy() Function
y <- qcauchy(x, scale = 4)
y

chevron_right


Output:

[1]      -Inf -5.505528 -1.299679  1.299679  5.505528       Inf

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

# R Program to compute value of
# cauchy quantile function
  
# Creating vector for x-values
x <- seq(0, 1, by = 0.02)
  
# Apply qcauchy() Function
y <- qcauchy(x, scale = 1)
  
# Plotting the graph
plot(y)

chevron_right


Output:

My Personal Notes arrow_drop_up

Recommended Posts:


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.