-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for XeLaTeX and OTF fonts. Add index entries. Update for versi…
…ons of packages as of 2016-10-22.
- Loading branch information
Showing
31 changed files
with
121,182 additions
and
75,069 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
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
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,38 @@ | ||
% !Rnw root = appendix.main.Rnw | ||
|
||
<<echo=FALSE, include=FALSE>>= | ||
opts_chunk$set(opts_fig_wide) | ||
opts_knit$set(concordance=TRUE) | ||
@ | ||
|
||
\chapter{If and when R needs help}\label{chap:R:data} | ||
|
||
\section{Introduction} | ||
|
||
S (R is sometimes called Gnu S) is a very well designed language, but it was designed with a specific purpose in mind. No tool can handle efficiently and gracefully every task one may want to throw at it. R is no different. However, R is good at working together with other languages and tools. As for most tasks in life, for data analysis one may find the best tools for our toolbox scattered around the place and coming from different sources. What is important in any tool pack is that all the tools can be used together in an efficient and `fluid' combination. In this final chapter, I will give an overview of what is available, giving only minimal examples, as a teaser for readers to explore on their own what may be most useful for their jobs. | ||
|
||
\section{R's limitations and strengths} | ||
|
||
\subsection{Using the best tool for each job} | ||
|
||
\subsection{R is great, but} | ||
|
||
\subsection{On choice versus fashion} | ||
|
||
\subsection{On finding one's own way around} | ||
|
||
\subsection{Getting around performance issues} | ||
|
||
\subsection{Re-using code writing in other languages} | ||
|
||
\section{C++} | ||
|
||
\section{FORTRAN and C} | ||
|
||
\section{Phyton} | ||
|
||
\section{Java} | ||
|
||
\section{Javascript} | ||
|
||
\section{sh, bash} |
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
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 @@ | ||
\Sconcordance{concordance:R.plot-gantt.tex:R.plot-gantt.Rnw:% | ||
1 11 1 10 0 34 1 38 0 12 1 4 0 6 1 8 0 1 1} |
Binary file not shown.
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,65 @@ | ||
\subsection{Gantt charts} | ||
|
||
Example from Richie Cotton's answer at \url{http://stackoverflow.com/a/3556020/2419892}. | ||
|
||
<<gantt-1>>= | ||
library(reshape2) | ||
library(ggplot2) | ||
library(ggpmisc) | ||
library(tibble) | ||
library(dplyr) | ||
@ | ||
|
||
<<gantt-2>>= | ||
tasks <- c("Screen for photoreceptor mutants (M. truncatula)", | ||
"Transfer photoreceptor mutants to accessions (M. truncatula)", | ||
"Exp. with accessions (M. truncatula)", | ||
"Exp. with photoreceptor mutants (M. truncatula)", | ||
"Exp. with cultivars/lines (V. faba)", | ||
"Exp. with segregating pop. (V. fava)", | ||
"Exp. with photoreceptor mutants (A. thaliana)", | ||
"Exp. with accessions (A. thaliana)") | ||
tasks <- c("Screen for photoreceptor mutants (\\emph{M. truncatula})", | ||
"Transfer photoreceptor mutants to accessions (\\emph{M. truncatula})", | ||
"Exp. with accessions (\\emph{M. truncatula})", | ||
"Exp. with photoreceptor mutants (\\emph{M. truncatula})", | ||
"Exp. with cultivars/lines (\\emph{V. faba})", | ||
"Exp. with segregating pop. (\\emph{V. fava})", | ||
"Exp. with photoreceptor mutants (\\emph{A. thaliana})", | ||
"Exp. with accessions (\\emph{A. thaliana})") | ||
tasks <- factor(tasks, levels = rev(tasks)) | ||
levels(tasks) | ||
dfr <- tibble( | ||
task = tasks, | ||
start.date = c(0.0, 1.0, 0.35, 2.0, 0.25, 2.25, 0.0, 1.0), | ||
end.date = c(3.0, 4.0, 4.75, 4.5, 1.70, 4.70, 2.0, 3.0), | ||
location = c("HU+HCM", "HU", "HU+BGU+SARDI", "HU+BGU+SARDI", "HU", "HU", "HU", "HU+HCM"), | ||
# theme = c(), | ||
species = c("M. truncatula", "M. truncatula", "M. truncatula", "M. truncatula", "V. faba", "V. faba", "A. thaliana", "A. thaliana") | ||
) | ||
levels(dfr$task) | ||
dfr <- arrange(dfr, species, start.date) | ||
mdfr <- melt(dfr, measure.vars = c("start.date", "end.date")) | ||
levels(mdfr$task) | ||
@ | ||
|
||
<<gantt-3>>= | ||
fig.gantt <- ggplot(mdfr, aes(value, task)) + | ||
# geom_debug() + | ||
geom_line(aes(color = location), size = 8) + | ||
# geom_line(aes(color = species), size = 3) + | ||
xlab("Time (years)") + | ||
ylab(NULL) + | ||
xlim(0,5) + | ||
# theme_minimal() + | ||
theme_light() + | ||
theme(legend.position = c(3.2, 3.7)) | ||
@ | ||
|
||
<<gantt-5>>= | ||
tikzDevice::tikz("gantt.tex", width = 6, height = 3) | ||
print(fig.gantt) | ||
dev.off() | ||
@ | ||
|
Oops, something went wrong.