-
Notifications
You must be signed in to change notification settings - Fork 0
/
testrmd.Rmd
84 lines (70 loc) · 2.7 KB
/
testrmd.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
title: "Describing Data"
date: "1/27/2022"
output: html_document
---
<script type="text/javascript">
function showhide(id) {
var e = document.getElementById(id);
e.style.display = (e.style.display == 'block') ? 'none' : 'block';
}
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(mosaic)
library(pander)
library(tidyverse)
library(plotly)
```
Calculating treatment means for **one factor**:
```{r eval = FALSE, echo = TRUE}
library(mosaic)
library(pander)
favstats(Y~X, data=YourDataSet)
```
DP Example code:
<a href="javascript:showhide('mosaic_mean')">
<div class="hoverchunk">
<span class="tooltipr">
library(mosaic)
<span class="tooltiprtext">mosaic is an R Package that is useful in the teaching of statistics to beginning programmers.</span>
</span><br><span class="tooltipr">
library(pander)
<span class="tooltiprtext">pander is an R Package that makes R output look pretty</span>
</span><br><span class="tooltipr">
favstats(
<span class="tooltipRtext">a function from the mosaic package that returns a set of favorite summary statistics</span>
</span><span class="tooltipr">
Temp
<span class="tooltipRtext">This is our response variable. From `?airquality` you can see in the help file that Temp is the maximum daily temp in degrees F at La Gaurdia Aiport during 1973</span>
</span><span class="tooltipr">
~
<span class="tooltipRtext">"~" is the tilde symbol. It can be interpreted as "y broken down by x"; "y modeled by x"; "y explained by x", etc. Where y is on the left of the tilde and x is on the right. </span>
</span><span class="tooltipr">
Month,
<span class="tooltiprtext">"Month" is a column from the airquality dataset that can be treated as qualitative.</span>
</span><span class="tooltipr">
data = airquality
<span class="tooltiprtext">You have to tell R what dataset the variables Temp and Month come from. 'airquality' is a preloaded dataset in R. </span>
</span><span class="tooltipr">
)
<span class="tooltiprtext">Functions must always end with a closing parenthesis.</span>
</span><span class="tooltipr" style="float:right;">
Click to view output
<span class="tooltiprtext">Click to View Output.</span>
</span>
</div>
</a>