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

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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