Skip to content

Instantly share code, notes, and snippets.

@m-note
m-note / report_template.tex
Last active February 28, 2016 01:00
Texレポートテンプレート
\documentclass[a4paper,10.5pt]{jarticle} %jsarticleでも良いかも
%--脚注の設定
\usepackage{natbib}
\bibpunct[, ]{(}{)}{;}{and}{}{,} %本文での引用の体裁はここで整えられるみたい
\bibliographystyle{apsr2006} %このagsmは編集済みなので注意。ジャーナルが太字にならないようにしてる。ブログ参照。
\usepackage{amsmath}
%--余白の設定 http://pcwide-jp.blogspot.co.uk/2009/07/latex.html より
\setlength{\topmargin}{20mm}
\addtolength{\topmargin}{-1in}
\setlength{\oddsidemargin}{20mm}
@m-note
m-note / case_match.Rmd
Last active September 28, 2015 06:22
Chapter 3の事例選択
---
title: "Dissertation_Case_Match"
output: html_document
---
パッケージの読み込み
```{r warning=FALSE}
library(dplyr)
```
データの読み込み
---
title: "Graph for Autocratic Regime Data"
date: "2015年9月24日"
output: html_document
---
# データとパッケージの読み込み
```{r warning=FALSE}
data <- read.csv("Regimes_GWF_CGV_Rename.csv")
library(dplyr)
@m-note
m-note / Polity_lines.R
Last active September 24, 2015 11:35
エリアプロット
---
title: "Polity Line Graph"
date: "2015年9月24日"
output: html_document
---
# まずパッケージを読み込む
```{r}
library(ggplot2)
library(foreign)
@m-note
m-note / .vimrc
Last active February 28, 2016 01:35
Vimの設定ファイル
set nocompatible
nnoremap O :<C-u>call append(expand('.'), '')<Cr>j
"行番号を表示する
set number
"タブ幅の設定、Tabではなくスペース4つにする
set tabstop=2
set noexpandtab
@m-note
m-note / ggplot_sample.R
Last active September 18, 2015 06:35
ggplot2で折れ線グラフ + 複数のグラフを並べる
library(ggplot2)
library(reshape2) # melt()用
library(grid) ; library(gridBase) # 複数の図の配置 cf. http://d.hatena.ne.jp/dichika/20110116/1295183973
country_list = c("Egypt", "Armenia",
"Afghanistan", "Azerbaijan", "Bosnia", "Cambodia", "Croatia",
"Eritrea", "Kazakhstan", "South Africa", "Vietnam")
for (country in country_list){
aid_amount <- AidData[AidData$recipient==country, c("Aid_All", "year", "p4_polity2", "Giniall")] # 全ての援助額
\begin{frame}<beamer>
\frametitle{この章の内容}
\tableofcontents[currentsection]
\end{frame}
{\fontsize{9.5pt}{8pt}\selectfont }
@m-note
m-note / beamer_template_default.tex
Last active February 28, 2016 01:02
1つ目がもっともベーシックなもの、2つ目はProgress Dotsを表示させるもの。
\documentclass[10pt, dvipdfmx]{beamer}
\usetheme{Frankfurt}
\setbeamersize{text margin left=11pt,text margin right=11pt}
\usenavigationsymbolstemplate{}
\usepackage{beamerthemeshadow}
\let\oldfootnotesize\footnotesize
\renewcommand*{\footnotesize}{\oldfootnotesize\tiny}
\setbeamertemplate{footline}[frame number]
@m-note
m-note / graduation_thesis.tex
Last active February 28, 2016 01:00
卒論などの長い論文用
\documentclass[report, 10.5pt,a4paper,oneside,openany]{jsbook}
%--脚注の設定
\usepackage{natbib}
\bibpunct[, ]{(}{)}{;}{and}{}{,} %本文での引用の体裁はここで整えられるみたい
%目次に索引以外は出力する cf. http://www.howtotex.com/packages/how-to-add-bibliography-and-more-to-table-of-contents/
\usepackage[notindex, nottoc, notlof, notlot]{tocbibind}
%数式用
\usepackage{amsmath}