Get the natural logarithm of the beta value of Non-Negative numeric vectors in R Language – lbeta() Function

lbeta() function in R Language is used to return the natural logarithm of the beta function. The beta function is also known as Euler’s integral of the first kind.

Syntax: lbeta(a, b)

Parameters:
a, b: non-negative numeric vectors

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

# R program to illustrate
# lbeta function
  
# Calling the lbeta() function
lbeta(1, 2)
lbeta(2, 2)
lbeta(3, 5)

chevron_right


Output:

[1] -0.6931472
[1] -1.791759
[1] -4.65396

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

# R program to illustrate
# lbeta function
  
# Initializing some vectors
x <- c(1, 2, 3)
y <- c(2, 4, 6)
  
# Calling the lbeta() function
lbeta(x, y)

chevron_right


Output:

[1] -0.6931472 -2.9957323 -5.1239640
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.