« first day (3031 days earlier)      last day (780 days later) » 

4:53 AM
Hi I am trying to create a for loop in a simulation model. It must meet the following requirements. If the gamma values are less than or equal to 5, print yes or no. If the gamma values are less than or equal to 1, print yes or no. If both of the mentioned conditions are "yes", then multiply the values by the cost. The cost is $100.

This is what I have but I am stuck at putting the entire set together. Thanks.

cost <- 100
n_samp <-1000

list <-c()
#Simulation of years until failure
gamma<-rgamma(n_samp,2,0.5)
 

« first day (3031 days earlier)      last day (780 days later) »