Dear Andrea, On Tue, Dec 15, 2009 at 11:19 AM, Andrea Fui <warloc...@gmail.com> wrote: > HI, i'm really new of R and i need some help. > > I have to describe some distributions for some dices throw: > - launching 3 dices i need the distribution of the sum of the two higher > values > - launching 4 dices i need the distribution of the occurrences of the same > value > > possibly i need a way to compare the two distribution adding the fourth dice > to the first without summing it (only for occurrences count purpose) > > sorry for my english and thank you for the help :) > > Andrea > > [[alternative HTML version deleted]] >
I recommend the following, in the order given. http://www.r-project.org/posting-guide.html Then from the R command line: ?expand.grid ?transform ?apply ?aggregate install.packages("prob") library(prob) vignette("prob") # see section 8 ?rolldie ?addrv ?marginal Then turn off the computer, pick up a pencil, and solve the problems by hand. Wait a minute, maybe that should be step 1? Have fun, Jay *************************************************** G. Jay Kerns, Ph.D. Associate Professor Department of Mathematics & Statistics Youngstown State University Youngstown, OH 44555-0002 USA Office: 1035 Cushwa Hall Phone: (330) 941-3310 Office (voice mail) -3302 Department -3170 FAX VoIP: gjke...@ekiga.net E-mail: gke...@ysu.edu http://people.ysu.edu/~gkerns/ ______________________________________________ R-help@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.