Research and Teaching Statements"

Research Statement

This is your research statement.

Topic 1

This is topic 1.

Topic 2

This is topic 2.

Teaching Statement

This is my teaching statement.

Topic 1

This is topic 1.

Topic 2

This is topic 2.

How to use

# Markdown Syntax
# - FORMAT  : *italic*, **bold**, `code`, ~subscript~, ^superscript^, > quote, ^[footnote] # - [](hyperlink)
# - EQUATION: $inline equation$, $$display equation$$, \begin{equation} (\#eq:eq-label)\end(equation), \@ref(eq:eq-label)
# - CITATION: [@bib-entry1; @bib-entry2]
# - FIGURE  : ![](image link), knitr::include_graphics(), \@ref(fig:fig1)
# - TABLE   : knitr::kable(), \@ref(tab:tab1)

This template intends to show how to work with R markdown briefly.

Basic

Fonts

italic

bold

code

Superscript: mc^2^

Subscript: CO~2~

Hyperlinks

Hyperlink

Items

  1. Numbered items
    1. Lower levels
    2. Lower levels
  2. Numbered items

  3. Unnumbered items

  4. Lower levels
  5. Lower levels
  6. Unnumbered items

Code block

x = 1

Quates

quote

Footnotes

A footnotes can be created like this: footnote^[This is a footnote 1].

Or like this: another footnote[^footnote2]

[^footnote2]: This is another footnote.

Intermediate

Images

An image can be inserted directly like this:

![](https://openr.netlify.com/img/banners/logo-rosr.png)

If you need customized images, especially cross-reference for the image like Figure \@ref(fig:image1), use R scripts like this:

(ref:image1) This is a caption of an image.

if(file.exists('logo-rosr.png')){
  knitr::include_graphics('logo-rosr.png')  # insert a local image
} else{
  plot(1) # plot an image.
}

Tables

Insert a table with basic markdown like this:

column1 column2


row1 row1 row2 row2

or use scripts like Table \@ref(tab:tab1):

(ref:tab1) This is the caption of a table.

knitr::kable(head(cars), caption = "(ref:tab1)")

Equations

An inline equation is like this:$F(x) = \int^a_b \frac{1}{3}x^3$.

An display equation can be inserted like this:

$$F(x) = \int^a_b \frac{1}{3}x^3$$

If an equation should be numbered or cross-referred, insert it like Equation \@ref(eq:eqtest) for pdf and html:

\begin{align} F(x) = \int^a_b \frac{1}{3}x^3 (#eq:eqtest) \end{align}

and Equation (@eq-mc) for Word.

(@eq-mc) $F(x) = \int^a_b \frac{1}{3}x^3$

Citation

Suppose you have a .bib file named 'rosr.bib' (See bibliography: in the YALM header). If not, you can create a bib file like this.

knitr::write_bib(c('knitr', 'rosr'), file = 'rosr.bib')

Now insert citations like this: @R-knitr, [@R-knitr;@R-rosr].

Numbers

temperature <- 17

We can use the results. For example, the mean temperature is r temperature degree.

Advanced

The codes in this section are all commented, for non-'rosr' project. But if you are organizing a 'rosr' project with, you can share resources easily between manuscripts, slides, posters, and so on. In a 'rosr' project, images are placed in the 'image' folder, bibliography in the 'bib' folder, R scripts in the 'R' folder, and equations in the 'equation' folder. If this is in a 'rosr' project, uncomment the following codes and try.

Firstly, we save the working directory. switch off the warning and message display in a manuscript if you want.

# oldwd <- getwd()
# knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE) 

set the root dir as the project directory, syc the bibliography and load data or functions within the project.

# knitr::opts_knit$set(root.dir = dirname(dirname(oldwd)))
# file.copy('bib/rosr.bib', oldwd)
# source('R/rosr.R')

Load the 'rosr' package,

# require('rosr')

and an image could be inserted like this:

# fig('rosr_R.png')

and an equation could be inserted like this:

# eqs <- 'equation/rosr-eq.Rmd'
# eq(eqs, label = 'sd')

References



Try the rosr package in your browser

Any scripts or data that you put into this service are public.

rosr documentation built on July 2, 2020, 2:28 a.m.