Trending
WHO Report Warns Global Progress Against HIV and Hepatitis is Losing Momentum is trending now Plateau Records 441 Suspected Cholera Cases, 14 Deaths is trending now Hygiene: Reckitt launches nationwide hygiene challenge is trending now NASA Will Chase the August Eclipse With a Jet as Totality Crosses the Arctic and Spain is trending now Moon's thick crust could amplify elusive gravitational-wave signals is trending now Hidden charcoal reveals the true age of ancient cave paintings is trending now A Cockroach 'Collective Memory' Emerges From Their Social Networks, Study Suggests is trending now World Cup 2026: FIFA’s Goal of the tournament confirmed is trending now Real Madrid in trouble: Diomande puts Perez before the "thorny file" is trending now Zinedine Zidane: Former Real Madrid manager appointed as France head coach is trending now Burna Boy stopped speaking to me over rumours that I slept with his girlfriend – Shatta W… is trending now VMFA Aaron Siskind Award for Photography (US) is trending now WHO Report Warns Global Progress Against HIV and Hepatitis is Losing Momentum is trending now Plateau Records 441 Suspected Cholera Cases, 14 Deaths is trending now Hygiene: Reckitt launches nationwide hygiene challenge is trending now NASA Will Chase the August Eclipse With a Jet as Totality Crosses the Arctic and Spain is trending now Moon's thick crust could amplify elusive gravitational-wave signals is trending now Hidden charcoal reveals the true age of ancient cave paintings is trending now A Cockroach 'Collective Memory' Emerges From Their Social Networks, Study Suggests is trending now World Cup 2026: FIFA’s Goal of the tournament confirmed is trending now Real Madrid in trouble: Diomande puts Perez before the "thorny file" is trending now Zinedine Zidane: Former Real Madrid manager appointed as France head coach is trending now Burna Boy stopped speaking to me over rumours that I slept with his girlfriend – Shatta W… is trending now VMFA Aaron Siskind Award for Photography (US) is trending now
Qualcomm

Loading a 1% Random Sample

Loading a 1% Random Sample

I needed to load a one percent random sample of a large file last week. I’m sure others have figured out this method but this was the first time I coded it like this: MYSAMPLE: Load * from MYFILE.qvd (qvd) Where Rand()<=0.01; The Rand function returns a random value between 0 and 1. In the load statement above it would only be true 1% of the time (approximately) -- that would load only 1% of the rows. If it was coded as Where Rand()<=0.20 then it would be a 20% random sample, etc. This method can be used with almost any Load statement even one of the steps in a preceding load.  Note that we're talking about random numbers here so the total number of rows loaded using this technique will not be exactly 1% of the total rows in the file, although it will be close especially when the total number of rows in the file is very large. Be aware too that the rows that get loaded will not be an evenly distributed sample of rows although it will be close.   ★★★

View original source →

Related