R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

# Using read.table()
data <- read.table(header=TRUE, text='
number  length
1  3.5
2  4.2
3  4.9
4  4.6
5  2.8
6  5.6
7  4.2
8  4.9
9  4.4
10  3.7
11  3.8
12  4
13  5.2
14  3.9
15  5.6
16  5.3
17  5
18  4.7
19  4
20  3.1
21  5.8
22  3.6
23  6
24  4.2
25  5.7
26  3.9
27  4.7
28  5.3
29  5.5
30  4.7
31  6.4
32  3.8
33  3.9
34  4.2
35  5.1
36  5.1
37  4.1
38  3.6
39  4.2
40  5
41  4.2
42  5.2
43  5.3
44  6.4
45  4.4
46  3.6
47  3.7
48  4.2
49  4.8')
#最大、最小、平均などをだします。
summary(data$length)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   2.800   3.900   4.400   4.571   5.200   6.400

histgramを描きます。

hist(data$length)

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.