Random number for triangular distribution in statistics

Hi, I am new in R,

I wanna generate random number in triangular shape distribution

I just learned runif function add the max and min value, but the shape is different,

this may help you

library(EnvStats)  

#generates 100 random numbers between 0 and 1 with mode = 0.5
rtri(100, min = 0, max = 1, mode = 1/2)

It works!!! Thanksss for your helpppp

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.