-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# example 10.1 of section 10.2.1 | ||
# (example 10.1 of section 10.2.1) : Documentation and deployment : Using knitr to produce milestone documentation : What is knitr? | ||
# Title: knitr-annotated Markdown | ||
|
||
# Simple knitr Markdown example # Note: 1 | ||
|
||
Two examples: | ||
|
||
* plotting | ||
* calculating | ||
|
||
Plot example: | ||
```{r plotexample, fig.width=2, fig.height=2, fig.align='center'} # Note: 2 | ||
library(ggplot2) # Note: 3 | ||
ggplot(data=data.frame(x=c(1:100),y=sin(0.1*c(1:100)))) + | ||
geom_line(aes(x=x,y=y)) | ||
``` # Note: 4 | ||
Calculation example: # Note: 5 | ||
```{r calcexample} # Note: 6 | ||
pi*pi | ||
``` | ||
|
||
# Note 1: | ||
# Markdown text and formatting | ||
|
||
# Note 2: | ||
# knitr chunk open with option | ||
# assignments | ||
|
||
# Note 3: | ||
# R code | ||
|
||
# Note 4: | ||
# knitr chunk close | ||
|
||
# Note 5: | ||
# More Markdown text | ||
|
||
# Note 6: | ||
# Another R code chunk | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.