inst/APCode/Ch12.R

### R code from vignette source 'Ch12.rnw'

###################################################
### code chunk number 1: setup
###################################################
source("GenericSettings.R")


###################################################
### code chunk number 2: Ch12.rnw:19-20
###################################################
choose(4,3)


###################################################
### code chunk number 3: Ch12.rnw:36-37
###################################################
punif(4, min=0, max=10)


###################################################
### code chunk number 4: Ch12.rnw:40-43
###################################################
x=1:10
Fx=1-(10-x)^2/100
Fx


###################################################
### code chunk number 5: Ch12.rnw:46-51
###################################################
Triangular <- function(x){
Fx=1-(10-x)^2/100
return(Fx)
}
Triangular(5.4)


###################################################
### code chunk number 6: Ch12.rnw:57-58
###################################################
ppois(10, 12, lower.tail=FALSE)


###################################################
### code chunk number 7: Ch12.rnw:63-64
###################################################
pexp(5, rate=0.4, lower.tail=FALSE)

Try the MindOnStats package in your browser

Any scripts or data that you put into this service are public.

MindOnStats documentation built on May 2, 2019, 9:42 a.m.