[R] Starting with R and distributions graphics
G. Jay Kerns
gkerns at ysu.edu
Tue Dec 15 18:37:38 CET 2009
Dear Andrea,
On Tue, Dec 15, 2009 at 11:19 AM, Andrea Fui <warlock84 at 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: gjkerns at ekiga.net
E-mail: gkerns at ysu.edu
http://people.ysu.edu/~gkerns/
More information about the R-help
mailing list