How to obtain a random number selection from a list

2 views
Skip to first unread message

Luis Cubillos

unread,
Dec 15, 2021, 4:48:09 PM12/15/21
to us...@admb-project.org

Dear ADMB users,

I am trying a code to obtain an integer from a list in ADMB, similar to this in R:

output <- sample(size=1, x = c(1,2), prob= c(0.8,0.2))

Is there any option in C++ or ADMB?

Luis Cubillos
Reply all
Reply to author
Forward
0 new messages