Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Biometrics template * Fiddling to make sure we've got the right LaTeX packages. Extended example text in template. * Added some examples and changed date to pull from Sys.Date * Added longtable * Update DESCRIPTION * Update NEWS * Update NEWS * Added biometrics_article to tests * Updated Rd and namespace using devtools::document() * Update README.md with Biometrics article * Removed dependency on tikzDevice * Added a few booktabs (for xtable compatibility) and provided command for tightlist. Changed default citation_package to natbib to match template. * changed citation_package default to "natbib"
- Loading branch information
1 parent
54394de
commit 0650a85
Showing
14 changed files
with
3,598 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
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,21 @@ | ||
#' Biometrics Journal format. | ||
#' | ||
#' This format was adapted from the Biometrics Macro package. | ||
#' | ||
#' | ||
#' @inheritParams rmarkdown::pdf_document | ||
#' @param ... Arguments to \code{rmarkdown::pdf_document} | ||
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} | ||
#' @examples | ||
#' \dontrun{ | ||
#' rmarkdown::draft("MyArticle.Rmd", template = "biometrics_article", package = "rticles") | ||
#' } | ||
#' | ||
#' @export | ||
biometrics_article <- function(..., keep_tex = TRUE, citation_package = 'natbib'){ | ||
template <- find_resource("biometrics_article", "template.tex") | ||
inherit_pdf_document(template = template, | ||
keep_tex = keep_tex, | ||
citation_package = citation_package, | ||
...) | ||
} |
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
101 changes: 101 additions & 0 deletions
101
inst/rmarkdown/templates/biometrics_article/resources/template.tex
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,101 @@ | ||
\documentclass[useAMS,usenatbib$if(referee)$,referee$endif$]{biom} | ||
%\documentclass[useAMS,usenatbib,referee]{biom} | ||
% | ||
% | ||
% Papers submitted to Biometrics should ALWAYS be prepared | ||
% using the referee option!!!! | ||
% | ||
% | ||
% If your system does not have the AMS fonts version 2.0 installed, then | ||
% remove the useAMS option. | ||
% | ||
% useAMS allows you to obtain upright Greek characters. | ||
% e.g. \umu, \upi etc. See the section on "Upright Greek characters" in | ||
% this guide for further information. | ||
% | ||
% If you are using AMS 2.0 fonts, bold math letters/symbols are available | ||
% at a larger range of sizes for NFSS release 1 and 2 (using \boldmath or | ||
% preferably \bmath). | ||
% | ||
% The usenatbib command allows the use of Patrick Daly's natbib package for | ||
% cross-referencing. | ||
% | ||
% If you wish to typeset the paper in Times font (if you do not have the | ||
% PostScript Type 1 Computer Modern fonts you will need to do this to get | ||
% smoother fonts in a PDF file) then uncomment the next line | ||
% \usepackage{Times} | ||
%%%%% AUTHORS - PLACE YOUR OWN MACROS HERE %%%%% | ||
|
||
\usepackage[figuresright]{rotating} | ||
\usepackage{tikz} | ||
\usepackage{amsmath} | ||
\usepackage[hyphens]{url} % not crucial - just used below for the URL | ||
\usepackage{hyperref} | ||
\usepackage[utf8]{inputenc} | ||
\usepackage{graphicx} | ||
\usepackage{longtable} | ||
\usepackage{booktabs} | ||
%% \raggedbottom % To avoid glue in typesetteing, sbs>> | ||
|
||
$if(highlighting-macros)$ | ||
$highlighting-macros$ | ||
$endif$ | ||
|
||
% tightlist command for lists without linebreak | ||
\providecommand{\tightlist}{% | ||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\setcounter{footnote}{2} | ||
|
||
\title[$header$]{$title$} | ||
|
||
\author{$for(author)$ $author.name$ \email{$author.email$} \\ $author.affiliation$ $sep$ \and | ||
$endfor$ | ||
} | ||
|
||
\begin{document} | ||
|
||
\date{{\it Received $month$} $year$} | ||
|
||
\pagerange{\pageref{firstpage}--\pageref{lastpage}} \pubyear{$year$} | ||
|
||
\volume{0} | ||
\artmonth{January} | ||
\doi{0000-0000-0000} | ||
|
||
% This label and the label ``lastpage'' are used by the \pagerange | ||
% command above to give the page range for the article | ||
|
||
\label{firstpage} | ||
|
||
% pub the summary here | ||
|
||
\begin{abstract} | ||
$abstract$ | ||
\end{abstract} | ||
|
||
% | ||
% Please place your key words in alphabetical order, separated | ||
% by semicolons, with the first letter of the first word capitalized, | ||
% and a period at the end of the list. | ||
% | ||
|
||
\begin{keywords} | ||
$keywords$. | ||
\end{keywords} | ||
|
||
\maketitle | ||
|
||
$body$ | ||
|
||
$if(natbib)$ | ||
|
||
\bibliographystyle{biom} | ||
\bibliography{$bibliography$} | ||
|
||
$endif$ | ||
|
||
\label{lastpage} | ||
|
||
\end{document} |
66 changes: 66 additions & 0 deletions
66
inst/rmarkdown/templates/biometrics_article/skeleton/bibliography.bib
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,66 @@ | ||
%% This BibTeX bibliography file was created using BibDesk. | ||
%% http://bibdesk.sourceforge.net/ | ||
%% Created for Sachs, Michael (NIH/NCI) [E] at 2014-10-27 13:53:44 -0400 | ||
%% Saved with string encoding Unicode (UTF-8) | ||
@book{pepe2003statistical, | ||
Author = {Pepe, Margaret Sullivan}, | ||
Date-Added = {2014-10-27 17:28:41 +0000}, | ||
Date-Modified = {2014-10-27 17:53:38 +0000}, | ||
Publisher = {Oxford University Press}, | ||
Title = {The statistical evaluation of medical tests for classification and prediction}, | ||
Year = {2003}} | ||
|
||
@article{hoerl1970ridge, | ||
Author = {Hoerl, Arthur E and Kennard, Robert W}, | ||
Date-Added = {2014-10-27 17:28:25 +0000}, | ||
Date-Modified = {2014-10-27 17:28:25 +0000}, | ||
Journal = {Technometrics}, | ||
Number = {1}, | ||
Pages = {55--67}, | ||
Publisher = {Taylor \& Francis Group}, | ||
Title = {Ridge regression: Biased estimation for nonorthogonal problems}, | ||
Volume = {12}, | ||
Year = {1970}} | ||
|
||
@article{zou2005regularization, | ||
Author = {Zou, Hui and Hastie, Trevor}, | ||
Date-Added = {2014-10-27 17:28:23 +0000}, | ||
Date-Modified = {2014-10-27 17:28:23 +0000}, | ||
Journal = {Journal of the Royal Statistical Society: Series B (Statistical Methodology)}, | ||
Number = {2}, | ||
Pages = {301--320}, | ||
Publisher = {Blackwell Publishing Ltd}, | ||
Title = {Regularization and variable selection via the elastic net}, | ||
Volume = {67}, | ||
Year = {2005}} | ||
|
||
@article{schoenfeld1982partial, | ||
Author = {Schoenfeld, David}, | ||
Date-Added = {2014-10-27 17:28:09 +0000}, | ||
Date-Modified = {2014-10-27 17:28:09 +0000}, | ||
Journal = {Biometrika}, | ||
Number = {1}, | ||
Pages = {239--241}, | ||
Publisher = {Oxford University Press}, | ||
Title = {Partial residuals for the proportional hazards regression model}, | ||
Volume = {69}, | ||
Year = {1982}} | ||
|
||
@article{heagerty2000time, | ||
Author = {Heagerty, Patrick J and Lumley, Thomas and Pepe, Margaret S}, | ||
Date-Added = {2014-10-27 17:28:02 +0000}, | ||
Date-Modified = {2014-10-27 17:28:02 +0000}, | ||
Journal = {Biometrics}, | ||
Number = {2}, | ||
Pages = {337--344}, | ||
Publisher = {Blackwell Publishing Ltd}, | ||
Title = {Time-dependent ROC curves for censored survival data and a diagnostic marker}, | ||
Volume = {56}, | ||
Year = {2000}} |
Oops, something went wrong.