## ---- echo=FALSE----------------------------------------
set.seed(1)
z = rnorm(10)
m = t.test(z)
m_stats = signif(c(m$statistic, m$parameter, m$p.value, m$conf.int), 3)
options(width = 58)
## -------------------------------------------------------
t.test(z)
## -------------------------------------------------------
lst = list(course = "modelling", no_of_partipants = 3,
first_names = c("Rod", "Hull", "Emu"))
## -------------------------------------------------------
lst[[3]]
## -------------------------------------------------------
lst[[3]][1]
## -------------------------------------------------------
length(lst)
## -------------------------------------------------------
lst[["course"]]
lst$course
## -------------------------------------------------------
str(lst)
## -------------------------------------------------------
rst = t.test(z)
## -------------------------------------------------------
length(rst)
## -------------------------------------------------------
names(rst)
## -------------------------------------------------------
str(rst)
## -------------------------------------------------------
rst$statistic
rst[[2]]
## ---- echo=FALSE----------------------------------------
votes = data.frame(Labour = c(762, 484),
Cons = c(327, 239),
LibDem = c(468, 477))
rownames(votes) = c("M", "F")
Xsq = chisq.test(votes)
## -------------------------------------------------------
names(Xsq)
## -------------------------------------------------------
Xsq$p.value
## -------------------------------------------------------
Xsq$expected
## -------------------------------------------------------
Xsq$stdres
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.