Skip to content

Commit 0650a85

Browse files
daltonhanceyihui
authored andcommitted
Added Biometrics Template (#170)
* 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"
1 parent 54394de commit 0650a85

File tree

14 files changed

+3598
-0
lines changed

14 files changed

+3598
-0
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Authors@R: c(
2828
person("Dominik", "Leutnant", role = c("aut", "cph"), email = "[email protected]"),
2929
person(family = "MDPI", role = c("aut", "cph")),
3030
person("Oğuzhan", "Öğreden", role = c("aut"), comment = c(ORCID = "0000-0002-9949-3348")),
31+
person("Dalton", "Hance", role = c("aut"), email = "[email protected]"),
3132
person("Daniel", "Nüst", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0002-0024-5046"))
3233
)
3334
Description: A suite of custom R Markdown formats and templates for

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export(aea_article)
66
export(amq_article)
77
export(ams_article)
88
export(asa_article)
9+
export(biometrics_article)
910
export(copernicus_article)
1011
export(copernicus_journal_abbreviations)
1112
export(ctex)

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ rticles 0.6 (unreleased)
33

44
- Added the template for the SAGE Journals (thanks, @oguzhanogreden, #181).
55

6+
- Added the template for Biometrics (thanks, @daltonhance, #170).
7+
68
- Added the template for Copernicus Publications journals (thanks, @nuest, #172).
79

810
- Supports syntax highlighting in the `ieee_article()` and `acm_article()` formats (thanks, @rainer-rq-koelle, #182).

R/biometrics_article.R

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#' Biometrics Journal format.
2+
#'
3+
#' This format was adapted from the Biometrics Macro package.
4+
#'
5+
#'
6+
#' @inheritParams rmarkdown::pdf_document
7+
#' @param ... Arguments to \code{rmarkdown::pdf_document}
8+
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}}
9+
#' @examples
10+
#' \dontrun{
11+
#' rmarkdown::draft("MyArticle.Rmd", template = "biometrics_article", package = "rticles")
12+
#' }
13+
#'
14+
#' @export
15+
biometrics_article <- function(..., keep_tex = TRUE, citation_package = 'natbib'){
16+
template <- find_resource("biometrics_article", "template.tex")
17+
inherit_pdf_document(template = template,
18+
keep_tex = keep_tex,
19+
citation_package = citation_package,
20+
...)
21+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown
2626

2727
- [AMS](https://www.ametsoc.org/) articles
2828

29+
- [Biometrics](http://www.biometrics.tibs.org/) articles
30+
2931
- [Bulletin de l'AMQ](https://www.amq.math.ca/bulletin/) journal submissions
3032

3133
- [CTeX](http://ctex.org) documents
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
\documentclass[useAMS,usenatbib$if(referee)$,referee$endif$]{biom}
2+
%\documentclass[useAMS,usenatbib,referee]{biom}
3+
%
4+
%
5+
% Papers submitted to Biometrics should ALWAYS be prepared
6+
% using the referee option!!!!
7+
%
8+
%
9+
% If your system does not have the AMS fonts version 2.0 installed, then
10+
% remove the useAMS option.
11+
%
12+
% useAMS allows you to obtain upright Greek characters.
13+
% e.g. \umu, \upi etc. See the section on "Upright Greek characters" in
14+
% this guide for further information.
15+
%
16+
% If you are using AMS 2.0 fonts, bold math letters/symbols are available
17+
% at a larger range of sizes for NFSS release 1 and 2 (using \boldmath or
18+
% preferably \bmath).
19+
%
20+
% The usenatbib command allows the use of Patrick Daly's natbib package for
21+
% cross-referencing.
22+
%
23+
% If you wish to typeset the paper in Times font (if you do not have the
24+
% PostScript Type 1 Computer Modern fonts you will need to do this to get
25+
% smoother fonts in a PDF file) then uncomment the next line
26+
% \usepackage{Times}
27+
%%%%% AUTHORS - PLACE YOUR OWN MACROS HERE %%%%%
28+
29+
\usepackage[figuresright]{rotating}
30+
\usepackage{tikz}
31+
\usepackage{amsmath}
32+
\usepackage[hyphens]{url} % not crucial - just used below for the URL
33+
\usepackage{hyperref}
34+
\usepackage[utf8]{inputenc}
35+
\usepackage{graphicx}
36+
\usepackage{longtable}
37+
\usepackage{booktabs}
38+
%% \raggedbottom % To avoid glue in typesetteing, sbs>>
39+
40+
$if(highlighting-macros)$
41+
$highlighting-macros$
42+
$endif$
43+
44+
% tightlist command for lists without linebreak
45+
\providecommand{\tightlist}{%
46+
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
47+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48+
49+
\setcounter{footnote}{2}
50+
51+
\title[$header$]{$title$}
52+
53+
\author{$for(author)$ $author.name$ \email{$author.email$} \\ $author.affiliation$ $sep$ \and
54+
$endfor$
55+
}
56+
57+
\begin{document}
58+
59+
\date{{\it Received $month$} $year$}
60+
61+
\pagerange{\pageref{firstpage}--\pageref{lastpage}} \pubyear{$year$}
62+
63+
\volume{0}
64+
\artmonth{January}
65+
\doi{0000-0000-0000}
66+
67+
% This label and the label ``lastpage'' are used by the \pagerange
68+
% command above to give the page range for the article
69+
70+
\label{firstpage}
71+
72+
% pub the summary here
73+
74+
\begin{abstract}
75+
$abstract$
76+
\end{abstract}
77+
78+
%
79+
% Please place your key words in alphabetical order, separated
80+
% by semicolons, with the first letter of the first word capitalized,
81+
% and a period at the end of the list.
82+
%
83+
84+
\begin{keywords}
85+
$keywords$.
86+
\end{keywords}
87+
88+
\maketitle
89+
90+
$body$
91+
92+
$if(natbib)$
93+
94+
\bibliographystyle{biom}
95+
\bibliography{$bibliography$}
96+
97+
$endif$
98+
99+
\label{lastpage}
100+
101+
\end{document}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
%% This BibTeX bibliography file was created using BibDesk.
2+
%% http://bibdesk.sourceforge.net/
3+
4+
5+
%% Created for Sachs, Michael (NIH/NCI) [E] at 2014-10-27 13:53:44 -0400
6+
7+
8+
%% Saved with string encoding Unicode (UTF-8)
9+
10+
11+
12+
@book{pepe2003statistical,
13+
Author = {Pepe, Margaret Sullivan},
14+
Date-Added = {2014-10-27 17:28:41 +0000},
15+
Date-Modified = {2014-10-27 17:53:38 +0000},
16+
Publisher = {Oxford University Press},
17+
Title = {The statistical evaluation of medical tests for classification and prediction},
18+
Year = {2003}}
19+
20+
@article{hoerl1970ridge,
21+
Author = {Hoerl, Arthur E and Kennard, Robert W},
22+
Date-Added = {2014-10-27 17:28:25 +0000},
23+
Date-Modified = {2014-10-27 17:28:25 +0000},
24+
Journal = {Technometrics},
25+
Number = {1},
26+
Pages = {55--67},
27+
Publisher = {Taylor \& Francis Group},
28+
Title = {Ridge regression: Biased estimation for nonorthogonal problems},
29+
Volume = {12},
30+
Year = {1970}}
31+
32+
@article{zou2005regularization,
33+
Author = {Zou, Hui and Hastie, Trevor},
34+
Date-Added = {2014-10-27 17:28:23 +0000},
35+
Date-Modified = {2014-10-27 17:28:23 +0000},
36+
Journal = {Journal of the Royal Statistical Society: Series B (Statistical Methodology)},
37+
Number = {2},
38+
Pages = {301--320},
39+
Publisher = {Blackwell Publishing Ltd},
40+
Title = {Regularization and variable selection via the elastic net},
41+
Volume = {67},
42+
Year = {2005}}
43+
44+
@article{schoenfeld1982partial,
45+
Author = {Schoenfeld, David},
46+
Date-Added = {2014-10-27 17:28:09 +0000},
47+
Date-Modified = {2014-10-27 17:28:09 +0000},
48+
Journal = {Biometrika},
49+
Number = {1},
50+
Pages = {239--241},
51+
Publisher = {Oxford University Press},
52+
Title = {Partial residuals for the proportional hazards regression model},
53+
Volume = {69},
54+
Year = {1982}}
55+
56+
@article{heagerty2000time,
57+
Author = {Heagerty, Patrick J and Lumley, Thomas and Pepe, Margaret S},
58+
Date-Added = {2014-10-27 17:28:02 +0000},
59+
Date-Modified = {2014-10-27 17:28:02 +0000},
60+
Journal = {Biometrics},
61+
Number = {2},
62+
Pages = {337--344},
63+
Publisher = {Blackwell Publishing Ltd},
64+
Title = {Time-dependent ROC curves for censored survival data and a diagnostic marker},
65+
Volume = {56},
66+
Year = {2000}}

0 commit comments

Comments
 (0)