/
Introduction.Rmd
164 lines (131 loc) · 4.51 KB
/
Introduction.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
title: "The `viabilitymetrics` Package: A Brief Introduction"
author: "Aravind, J., Radhamani, J., Vimala Devi, S., Jacob, S. R., and Kalyani Srinivasan"
date: '`r Sys.Date()`'
classoption: table
header-includes:
- \usepackage{fancyhdr}
- \usepackage{wrapfig}
- \pagestyle{fancy}
- \fancyhead[LE,RO]{\slshape \rightmark}
- \fancyfoot[C]{\thepage}
- \usepackage{hyperref}
- \hypersetup{colorlinks=true}
- \hypersetup{linktoc=all}
- \hypersetup{linkcolor=blue}
- \usepackage{pdflscape}
- \usepackage{booktabs}
- \usepackage{xcolor}
- \newcommand{\blandscape}{\begin{landscape}}
- \newcommand{\elandscape}{\end{landscape}}
- \fancyhead[LO,RE]{The \texttt{viabilitymetrics} package{:} A Brief Introduction}
output:
pdf_document:
dev: cairo_pdf
fig_caption: no
toc: no
html_document:
df_print: paged
toc: yes
csl: frontiers.csl
bibliography: REFERENCES.bib
link-citations: yes
vignette: |
%\VignetteIndexEntry{Introduction}
%\usepackage[utf8]{inputenc}
%\VignetteEngine{knitr::rmarkdown_notangle}
---
```{r, echo=FALSE}
out_type <- knitr::opts_knit$get("rmarkdown.pandoc.to")
```
```{r, results='asis', echo=FALSE}
switch(out_type,
html = {cat("<p> ICAR-National Bureau of Plant Genetic Resources, New Delhi.</p>")},
latex = cat("\\begin{center}
ICAR-National Bureau of Plant Genetic Resources, New Delhi.
\\end{center}" )
)
```
\begin{center}
\vspace{6pt}
\hrule
\end{center}
```{r, echo = FALSE}
knitr::opts_chunk$set(
comment = "",
fig.cap = ""
)
```
\tableofcontents
\begin{wrapfigure}{r}{0.35\textwidth}
\vspace{-20pt}
\begin{center}
\includegraphics[width=0.33\textwidth]{`r system.file("extdata", "viabilitymetrics.png", package = "viabilitymetrics")`}
\end{center}
\vspace{-20pt}
\end{wrapfigure}
<img src="https://raw.githubusercontent.com/aravind-j/viabilitymetrics/master/inst/extdata/viabilitymetrics.png" align="right" alt="logo" width="173" height = "200" style = "padding: 10px; border: none; float: right;">
## Overview
The package `viabilitymetrics`..............
\clearpage
## Installation
The package can be installed using the following functions:
```{r, eval=FALSE}
# Install from CRAN
install.packages('viabilitymetrics', dependencies=TRUE)
# Install development version from Github
devtools::install_github("aravind-j/viabilitymetrics")
```
Then the package can be loaded using the function
```{r}
library(viabilitymetrics)
```
## Viability constants
\rowcolors{2}{gray!25}{white}
\renewcommand{\arraystretch}{1.3}
```{r, echo = FALSE}
library(viabilitymetrics)
load("vc.rda")
vc$Species <- gsub("\\*", "*", vc$Species)
vc$Species <- paste("*", vc$Species, "*", sep = "")
vc$Species <- gsub("×", "$\\\\times$", vc$Species)
vc$Species <- gsub("(\\*)(.+)(cvs.|spp.)(\\*)", "\\1\\2\\4\\3", vc$Species)
vc$Species <- gsub("(\\*)(.+)(cv.)(\\s.+)(\\*)", "\\1\\2\\5\\3\\4", vc$Species)
vc$Species <- gsub("(\\*)(.+)(\\s)(ssp.)(\\s)(.+)(\\*)",
"\\1\\2\\*\\3\\4\\5\\*\\6\\7", vc$Species)
vc$Species <- gsub("(*)(\\*)", "\\2\\1", vc$Species)
vc$Species <- gsub("(\\()(.+)(\\))(\\*)", "\\4\\1\\2\\3", vc$Species)
# vc$Species <- gsub("(\\s)(subsp.)(\\s)", "\\1\\*\\2\\*\\3", vc$Species)
# vc$Species <- gsub("(\\s)(convar.)(\\s)", "\\1\\*\\2\\*\\3", vc$Species)
# vc$Species <- gsub("(\\s)(var.)(\\s)", "\\1\\*\\2\\*\\3", vc$Species)
ind <- grepl("*Cucurbita pepo subsp. pepo convar. pepo var. styriaca*",
vc$Species)
vc[ind,]$Species <- "*Cucurbita pepo* subsp. *pepo* convar. *pepo* var. *styriaca*"
vc$Reference <- gsub("\\[|\\]", "", vc$Reference)
colnames(vc) <- c("Index", "Species", "K~E~", "C~W~", "C~H~", "C~Q~", "Reference")
pander::pander(vc, style = 'multiline', justify = c('left'),
split.table = Inf, keep.line.breaks = TRUE,
use.hyphening = FALSE, missing = "")
```
* Viability constants are derived from storage experiment at a single temperature. C~H~ and C~Q~ here are the universal temperature coefficients (0.0329 and 0.000478 respectively).
## Citing `viabilitymetrics`
```{r, echo = FALSE, collapse = TRUE}
detach("package:viabilitymetrics", unload=TRUE)
suppressPackageStartupMessages(library(viabilitymetrics))
cit <- citation("viabilitymetrics")
# yr <- format(Sys.Date(), "%Y")
# cit[1]$year <- yr
# oc <- class(cit)
#
# cit <- unclass(cit)
# attr(cit[[1]],"textVersion") <- gsub("\\(\\)",
# paste("\\(", yr, "\\)", sep = ""),
# attr(cit[[1]],"textVersion"))
# class(cit) <- oc
cit
```
## Session Info
```{r}
sessionInfo()
```
## References