(This article was first published on

**R/exams**, and kindly contributed to R-bloggers)**Name:**

`ttest`

**Type:**

**Description:**

Results of a 2-sample

`t.test()`

in R need to be interpreted regarding significance, type of alternative, and comparison of the underlying empirical means.**Solution feedback:**

Yes

**Randomization:**

Random numbers, text blocks, and R output

**Mathematical notation:**

Yes

**Verbatim R input/output:**

Yes

**Images:**

No

**Other supplements:**

No

*(Note that the HTML output contains mathematical equations in MathML. It is displayed by browsers with MathML support like Firefox or Safari – but not Chrome.)*

**Demo code:**

```
library("exams")
set.seed(1090)
exams2html("ttest.Rnw")
set.seed(1090)
exams2pdf("ttest.Rnw")
set.seed(1090)
exams2html("ttest.Rmd")
set.seed(1090)
exams2pdf("ttest.Rmd")
```

To

**leave a comment**for the author, please follow the link and comment on their blog:**R/exams**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...