[R] Binomial simulation
Johannes Huesing
johannes at huesing.name
Sun Apr 19 21:53:25 CEST 2009
beetle2 <samandbrendan at aapt.net.au> [Sun, Apr 19, 2009 at 03:01:43AM CEST]:
>
> I'm thinking I will just use:
> results <- rbinom(1000, 10, .25)
> d = sum(results == 0 )
> df = (d/1000)
> df
>
> And do each individually
ok, at least you are trying some things out for yourself. In fact, along
with reading the doc, this is the fastest and most efficient way to
learn the language. If you keep going, you will soon realize that the
language is much more powerful than the vocabulary you are applying
currently. For the time being, try
table(result)
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale returns of conjecture
mailto:johannes at huesing.name from such a trifling investment of fact.
http://derwisch.wikidot.com (Mark Twain, "Life on the Mississippi")
More information about the R-help
mailing list