[R] ifelse command
David Winsemius
dwinsemius at comcast.net
Thu Aug 19 15:51:36 CEST 2010
On Aug 18, 2010, at 10:46 PM, Philip Wong wrote:
>
> well to be honest, it is a assignment for the Bayesian statistic
> paper I wish
> to take later in the academic year. But I'm a slow learner, so I'm
> going to
> try out some of the assignments posted in the university forum
> hoping to get
> some practice in advance.
>
> Could you please elaborate more on the set.seed() function, I
> understood
> from the ?set.seed the general idea of set.seed (if I didn't
> misunderstood
> it). I could stimulate a six side dice by set.seed(1:6) with n
> number of
> runs using runif(), does that meant if I use set.seed() I don't need
> to use
> the prob=c(1,1,2,3,2,1)/10) to create my bias dice?
No. set.seed()'s only purpose is to fix the RNG in a predictiable
starting state so that the reuslts of one or more simulation runs can
be recreated exactly.
> --
> View this message in context: http://r.789695.n4.nabble.com/ifelse-command-tp2329538p2330591.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list