Compute the beta value of Non-Negative Numeric Vectors in R Programming – beta() Function
Last Updated :
08 Jun, 2020
beta()
function in R Language is used to return the beta value computed using the beta function. The beta function is also known as Euler’s integral of the first kind.
Syntax: beta(a, b)
Parameters:
a, b: non-negative numeric vectors
Example 1:
beta( 1 , 2 )
beta( 2 , 2 )
beta( 3 , 5 )
|
Output:
[1] 0.5
[1] 0.1666667
[1] 0.00952381
Example 2:
x < - c( 1 , 2 , 3 )
y < - c( 2 , 4 , 6 )
beta(x, y)
|
Output:
[1] 0.500000000 0.050000000 0.005952381
Share your thoughts in the comments
Please Login to comment...