# Compute the Logistic Density in R Programming – dlogis() Function

`dlogis()` function in R Language is used to compute logistic density of the distribution. It also creates a plot of the density of the logistic distribution.

Syntax: dlogis(vec)

Parameters:
vec: Vector of x-values for density

Example 1:

 `# R program to calculate  ` `# logistic density ` ` `  `# Create a vector of x-values ` `x <``-` `seq(``-``1``, ``1``, by ``=` `0.1``) ` ` `  `# Calling the dlogis() function ` `y <``-` `dlogis(x) ` `y `

Output:

```  0.1966119 0.2055003 0.2139097 0.2217129 0.2287842 0.2350037 0.2402607
 0.2444583 0.2475166 0.2493760 0.2500000 0.2493760 0.2475166 0.2444583
 0.2402607 0.2350037 0.2287842 0.2217129 0.2139097 0.2055003 0.1966119
```

Example 2:

 `# R program to calculate  ` `# logistic density ` ` `  `# Create a vector of x-values ` `x <``-` `seq(``-``1``, ``1``, by ``=` `0.01``) ` ` `  `# Calling the dlogis() function ` `y <``-` `dlogis(x) ` ` `  `# Plot the 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.