BookmarkSubscribeRSS Feed
qkaiwei
Calcite | Level 5

R language stament, and how to do it by SAS IML?

b<-sample(1:9,size=3,replace=FALSE) , that means creating 1 set with 3 elements, every element is randomly selected from 1 to 9, and each element is different with the other two in the set(non-replacement sampling).

Thanks!

1 REPLY 1
Rick_SAS
SAS Super FREQ

If you have SAS/IML 12.1 (released with SAS 9.3M2), use the SAMPLE function.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 1002 views
  • 3 likes
  • 2 in conversation