Compute Randomly Drawn Log Normal Density in R Programming – rlnorm() Function
Last Updated :
25 Jun, 2020
rlnorm()
function in R Language is used to compute random log normal density among a range of inputs.
Syntax: rlnorm(N)
Parameters:
N: Sample Size
Example 1:
set .seed( 1000 )
N < - 20
y < - rlnorm(N)
y
|
Output:
[1] 0.6403257 0.2994354 1.0419837 1.8953214 0.4554113 0.6801178 0.6213456
[8] 2.0539211 0.9816646 0.2533159 0.3744010 0.5743659 1.1290552 0.8861471
[15] 0.2628844 1.1853730 1.1677499 1.0252453 0.1291752 1.2375754
Example 2:
set .seed( 1000 )
N < - 500
y < - rlnorm(N)
plot(y)
|
Output:
Share your thoughts in the comments
Please Login to comment...