-
Notifications
You must be signed in to change notification settings - Fork 1
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
Brian Fannin
authored and
Brian Fannin
committed
Apr 21, 2016
1 parent
c5bb738
commit 58243b9
Showing
6 changed files
with
208 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,2 @@ | ||
book_filename: "raw" | ||
chapter_name: "Chapter " |
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,18 @@ | ||
bookdown::gitbook: | ||
css: style.css | ||
config: | ||
toc: | ||
before: | | ||
<li><a href="./">raw - Raw Actuarial Workshops</a></li> | ||
after: | | ||
<li><a href="https://github.com/PirateGrunt/raw_book" target="blank">Published with bookdown</a></li> | ||
edit: | ||
link: https://github.com/PirateGrunt/raw_book/edit/master/%s | ||
bookdown::pdf_book: | ||
includes: | ||
in_header: preamble.tex | ||
latex_engine: xelatex | ||
citation_package: natbib | ||
bookdown::epub_book: default | ||
bookdown::html_book: | ||
theme: united |
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,28 @@ | ||
--- | ||
title: "raw - R Actuarial Workshops" | ||
author: "Brian A. Fannin, ACAS" | ||
date: "`r Sys.Date()`" | ||
site: bookdown::bookdown_site | ||
documentclass: book | ||
bibliography: [packages.bib] | ||
biblio-style: apalike | ||
link-citations: yes | ||
github-repo: PirateGrunt/raw_book | ||
description: "This is a companion to actuarial workshops." | ||
knit: "bookdown::render_book" | ||
--- | ||
|
||
```{r include=FALSE} | ||
# automatically create a bib database for R packages | ||
knitr::write_bib(c(.packages(), 'bookdown', 'knitr', 'rmarkdown'), 'packages.bib') | ||
``` | ||
|
||
# Introduction | ||
|
||
## Why does this book exist? | ||
|
||
## Who should use this? | ||
|
||
## Other stuff | ||
|
||
So, that's all the preliminaries. Away we go! |
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,19 @@ | ||
#========================================================= | ||
# Written by Brian A. Fannin | ||
# | ||
|
||
# Generate a random set of data with a linear relationship | ||
N <- 100 | ||
B0 <- 5 | ||
B1 <- 1.5 | ||
|
||
set.seed(1234) | ||
|
||
e <- rnorm(N, mean = 0, sd = 1) | ||
X1 <- rep(seq(1,10),10) | ||
|
||
Y <- B0 + B1 * X1 + e | ||
|
||
myFit <- lm(Y ~ X1) | ||
|
||
yHat <- predict(myFit) |
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,14 @@ | ||
p.caption { | ||
color: #777; | ||
margin-top: 10px; | ||
} | ||
p code { | ||
white-space: inherit; | ||
} | ||
pre { | ||
word-break: normal; | ||
word-wrap: normal; | ||
} | ||
pre code { | ||
white-space: inherit; | ||
} |
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,127 @@ | ||
#TOC ul, | ||
#TOC li, | ||
#TOC span, | ||
#TOC a { | ||
margin: 0; | ||
padding: 0; | ||
position: relative; | ||
} | ||
#TOC { | ||
line-height: 1; | ||
border-radius: 5px 5px 0 0; | ||
background: #141414; | ||
background: linear-gradient(to bottom, #333333 0%, #141414 100%); | ||
border-bottom: 2px solid #0fa1e0; | ||
width: auto; | ||
} | ||
#TOC:after, | ||
#TOC ul:after { | ||
content: ''; | ||
display: block; | ||
clear: both; | ||
} | ||
#TOC a { | ||
background: #141414; | ||
background: linear-gradient(to bottom, #333333 0%, #141414 100%); | ||
color: #ffffff; | ||
display: block; | ||
padding: 19px 20px; | ||
text-decoration: none; | ||
text-shadow: none; | ||
} | ||
#TOC ul { | ||
list-style: none; | ||
} | ||
#TOC > ul > li { | ||
display: inline-block; | ||
float: left; | ||
margin: 0; | ||
} | ||
#TOC > ul > li > a { | ||
color: #ffffff; | ||
} | ||
#TOC > ul > li:hover:after { | ||
content: ''; | ||
display: block; | ||
width: 0; | ||
height: 0; | ||
position: absolute; | ||
left: 50%; | ||
bottom: 0; | ||
border-left: 10px solid transparent; | ||
border-right: 10px solid transparent; | ||
border-bottom: 10px solid #0fa1e0; | ||
margin-left: -10px; | ||
} | ||
#TOC > ul > li:first-child > a { | ||
border-radius: 5px 0 0 0; | ||
} | ||
#TOC.align-right > ul > li:first-child > a, | ||
#TOC.align-center > ul > li:first-child > a { | ||
border-radius: 0; | ||
} | ||
#TOC.align-right > ul > li:last-child > a { | ||
border-radius: 0 5px 0 0; | ||
} | ||
#TOC > ul > li.active > a, | ||
#TOC > ul > li:hover > a { | ||
color: #ffffff; | ||
box-shadow: inset 0 0 3px #000000; | ||
background: #070707; | ||
background: linear-gradient(to bottom, #262626 0%, #070707 100%); | ||
} | ||
#TOC .has-sub { | ||
z-index: 1; | ||
} | ||
#TOC .has-sub:hover > ul { | ||
display: block; | ||
} | ||
#TOC .has-sub ul { | ||
display: none; | ||
position: absolute; | ||
width: 200px; | ||
top: 100%; | ||
left: 0; | ||
} | ||
#TOC .has-sub ul li a { | ||
background: #0fa1e0; | ||
border-bottom: 1px dotted #31b7f1; | ||
filter: none; | ||
display: block; | ||
line-height: 120%; | ||
padding: 10px; | ||
color: #ffffff; | ||
} | ||
#TOC .has-sub ul li:hover a { | ||
background: #0c7fb0; | ||
} | ||
#TOC ul ul li:hover > a { | ||
color: #ffffff; | ||
} | ||
#TOC .has-sub .has-sub:hover > ul { | ||
display: block; | ||
} | ||
#TOC .has-sub .has-sub ul { | ||
display: none; | ||
position: absolute; | ||
left: 100%; | ||
top: 0; | ||
} | ||
#TOC .has-sub .has-sub ul li a { | ||
background: #0c7fb0; | ||
border-bottom: 1px dotted #31b7f1; | ||
} | ||
#TOC .has-sub .has-sub ul li a:hover { | ||
background: #0a6d98; | ||
} | ||
#TOC ul ul li.last > a, | ||
#TOC ul ul li:last-child > a, | ||
#TOC ul ul ul li.last > a, | ||
#TOC ul ul ul li:last-child > a, | ||
#TOC .has-sub ul li:last-child > a, | ||
#TOC .has-sub ul li.last > a { | ||
border-bottom: 0; | ||
} | ||
#TOC ul { | ||
font-size: 1.2rem; | ||
} |