Skip to content
Prev 22453 / 398502 Next

badly written code may be slow (was hard to believe speed difference)

If you write R like C or Java, it will often be slow.  R is a vector
language, so learn to work with it rather than against it.

For a truncated (standard) normal, try qnorm(runif(500000, a, b)) for
suitable a and b (pnorm(lower) and pnorm(upper)?)

And what are you going to do with 0.5m truncated normals that makes 70s
significant?

BTW, R has system.time() to time things.
On Tue, 6 Aug 2002, Jason Liao wrote:

            
It's not the language ....