Identify or list each simulated outcome

Hello,

I am trying to model a montecarlo simulation of incidents using following code

n<-100000000
Cal_risk_A<-rnorm(n, 18.7688, 3.80)*rpois(n,1/9)

I want to include a term or condition where outcomes of each simulation that are zero (= 0) are deleted, or removed. Which is the easiest way to to it?

Thank you in advance

that should work

Cal_risk_A[Cal_risk_A!=0]

Thank you Melih! This was very helpful :slight_smile:

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.