Skip to content

Commit

Permalink
tried krantz running headers fix, does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
riinuots committed Sep 15, 2020
1 parent 45c6261 commit a7b4db5
Show file tree
Hide file tree
Showing 85 changed files with 21 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ my_saved_plot*
render*.rds
tmp-pdfcrop*
*.log
_bookdown_files/*/figure-epub3/*
_bookdown_files/*/epub3/*
_bookdown_files/*/html/*
_bookdown_files/*/figure-html/*
libs/*
Binary file modified _bookdown_files/02_basics_files/figure-latex/chap2-fig-gbd-1.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/healthyr-book.pdf
Binary file not shown.
24 changes: 12 additions & 12 deletions docs/healthyr-book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@

\title{R for Health Data Science}
\author{Ewen Harrison and Riinu Pius}
\date{2020-09-14}
\date{2020-09-15}

\begin{document}
\maketitle
Expand Down Expand Up @@ -1230,7 +1230,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] "2020-09-14 20:10:12 BST"
## [1] "2020-09-15 15:13:02 BST"
\end{verbatim}

\begin{Shaded}
Expand Down Expand Up @@ -1302,7 +1302,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## Time difference of 77.70124 days
## Time difference of 76.90761 days
\end{verbatim}

Since R knows this is a difference between two date/time objects, it prints them in a nicely readable way.
Expand All @@ -1328,7 +1328,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] "2021-03-21 04:49:47 UTC"
## [1] "2021-03-20 09:46:57 UTC"
\end{verbatim}

But if we want to use the number of days in a normal calculation, e.g., what if a measurement increased by 560 arbitrary units during this time period.
Expand All @@ -1354,7 +1354,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] 7.207092
## [1] 7.281465
\end{verbatim}

The \textbf{lubridate} package comes with several convenient functions for parsing dates, e.g., \texttt{ymd()}, \texttt{mdy()}, \texttt{ymd\_hm()}, etc. - for a full list see \url{lubridate.tidyverse.org}.
Expand Down Expand Up @@ -1406,7 +1406,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] "2020-09-14 20:10:12 BST"
## [1] "2020-09-15 15:13:02 BST"
\end{verbatim}

\begin{Shaded}
Expand All @@ -1416,7 +1416,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] "20:10 on September-14 (2020)"
## [1] "15:13 on September-15 (2020)"
\end{verbatim}

You can even add plain text into the \texttt{format()} function, R will know to put the right date/time values where the \texttt{\%} are:
Expand All @@ -1428,7 +1428,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] "Happy days, the current time is 20:10 September-14 (2020)!"
## [1] "Happy days, the current time is 15:13 September-15 (2020)!"
\end{verbatim}

\begin{Shaded}
Expand All @@ -1438,7 +1438,7 @@ \subsection{Date/time variables}\label{datetime-variables}}
\end{Shaded}

\begin{verbatim}
## [1] "Happy days, the current time is 20:10 September-14 (2020)!"
## [1] "Happy days, the current time is 15:13 September-15 (2020)!"
\end{verbatim}

\hypertarget{chap02-objects-functions}{%
Expand Down Expand Up @@ -1659,7 +1659,7 @@ \subsection{Function and its arguments}\label{function-and-its-arguments}}
\end{Shaded}

\begin{verbatim}
## [1] "2020-09-14 20:10:13 BST"
## [1] "2020-09-15 15:13:03 BST"
\end{verbatim}

\hypertarget{working-with-objects}{%
Expand Down Expand Up @@ -14698,9 +14698,9 @@ \chapter*{Appendix}\label{appendix}}
## gapminder_0.3.0 GGally_2.0.0 ggfortify_0.4.10
## ggplot2_3.3.2 kableExtra_1.1.0.9000 knitr_1.29
## lme4_1.1.23 lubridate_1.7.9 magrittr_1.5
## mice_3.10.0 MissMech_1.0.2 patchwork_1.0.0.9000
## mice_3.10.0 MissMech_1.0.2 patchwork_1.0.1
## purrr_0.3.4 readr_1.3.1 rmarkdown_2.3
## scales_1.1.1 stringr_1.4.0 survival_3.1.11
## scales_1.1.1 stringr_1.4.0 survival_3.2.3
## survminer_0.4.7 tibble_3.0.3 tidyr_1.1.0
## tidyverse_1.3.0
\end{verbatim}
Expand Down
6 changes: 4 additions & 2 deletions krantz.cls
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,10 @@
\else
\let\@oddfoot\@empty
\let\@evenfoot\@empty
\let\@evenhead\even@head
\let\@oddhead\odd@head
\def\@evenhead{\thepage\RunningHeadFont\hfill
\if@mainmatter\thechapter\enspace\fi\leftmark}%\even@head
\def\@oddhead{\hfil{\RunningHeadFont\if@mainmatter\thesection\enspace\else\fi\rightmark}
\hfill\thepage}%\odd@head
\fi
}
\else
Expand Down

0 comments on commit a7b4db5

Please sign in to comment.