-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ff4fdb5
Showing
13 changed files
with
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^LICENSE\.md$ |
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,4 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata |
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,11 @@ | ||
Package: rtemps | ||
Type: Package | ||
Title: My personal R templates | ||
Version: 0.1.0 | ||
Authors@R: person("John", "Zobolas", role = c("aut", "cph", "cre"), | ||
email = "[email protected]", comment = c(ORCID = "0000-0002-3609-8674")) | ||
Description: A collection of R templates. My personal favourites! | ||
License: MIT + file LICENSE | ||
URL: https://github.com/bblodfon/r-temps | ||
Encoding: UTF-8 | ||
LazyData: true |
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 @@ | ||
YEAR: 2020 | ||
COPYRIGHT HOLDER: John |
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 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2020 John | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
exportPattern("^[[:alpha:]]+") |
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,3 @@ | ||
hello = function() { | ||
print("Hello, world!") | ||
} |
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,12 @@ | ||
# r-templates | ||
|
||
My personal favourite R templates :) | ||
|
||
## Install | ||
|
||
Run: | ||
```r | ||
devtools::install_github("bblodfon/rtemps") | ||
``` | ||
|
||
Once the templates are installed, they will be available within the R Markdown templates in RStudio! |
69 changes: 69 additions & 0 deletions
69
inst/rmarkdown/templates/united_html/skeleton/skeleton.Rmd
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,69 @@ | ||
--- | ||
title: "Title" | ||
author: "[John Zobolas](https://github.com/bblodfon)" | ||
date: "Last updated: `r format(Sys.time(), '%d %B, %Y')`" | ||
output: | ||
html_document: | ||
css: style.css | ||
theme: united | ||
toc: true | ||
toc_float: | ||
collapsed: false | ||
smooth_scroll: true | ||
toc_depth: 4 | ||
number_sections: false | ||
code_folding: hide | ||
code_download: true | ||
--- | ||
|
||
## Intro {-} | ||
|
||
Nulla auctor egestas [tincidunt](#Sub-analysis). | ||
|
||
## Conclusion {-} | ||
|
||
<div class="green-box"> | ||
- *Cras tincidunt* felis venenatis pretium iaculis[<sup>1</sup>](#footnote1). | ||
- Curabitur in **tortor at tellus** fermentum elementum vel quis sem. | ||
</div> | ||
<br> | ||
<div class="orange-box"> | ||
Be careful, be gentle, be brave! | ||
</div> | ||
|
||
## Input {-} | ||
|
||
Loading libraries: | ||
```{r Load libraries, message = FALSE} | ||
library(xfun) | ||
library(DT) | ||
``` | ||
|
||
<div id="table1">A nice table example:</div> | ||
```{r} | ||
DT::datatable(mtcars, options = list(pageLength = 3)) | ||
``` | ||
|
||
## Analysis {-} | ||
|
||
`Vestibulum` imperdiet[<sup>2</sup>](#footnote2), ex vel sodales facilisis, nibh tellus imperdiet massa, sit amet scelerisque orci velit vel tellus. Ut consequat justo tincidunt porttitor varius. Suspendisse erat ipsum, feugiat vitae rhoncus non, molestie ac purus. Morbi aliquet, elit eget blandit suscipit, est lacus facilisis turpis, nec fermentum nunc felis et lorem. | ||
|
||
### Sub-analysis {-} | ||
|
||
Suspendisse potenti. Cras pulvinar ligula ac nisi porttitor, volutpat congue orci tincidunt. Pellentesque non mi congue, porta enim eget, venenatis sem. Integer suscipit vulputate tellus, eget commodo dolor gravida vel. Suspendisse gravida gravida ligula, in interdum sapien molestie ut. | ||
|
||
#### S2-analysis {-} | ||
|
||
<div class="blue-box"> | ||
In ut vehicula risus. | ||
</div> | ||
|
||
## R session info {-} | ||
|
||
```{r session info, comment=""} | ||
xfun::session_info() | ||
``` | ||
|
||
---- | ||
1. <div id="footnote1">Nullam quis sem nunc</div> | ||
2. <div id="footnote2">In eget eros sit amet leo feugiat consequat</div> |
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,26 @@ | ||
body { | ||
font-size: 1.6rem; | ||
text-align: justify; | ||
} | ||
|
||
h1,h2,h3,h4,h5 { | ||
text-align: left; | ||
} | ||
|
||
.blue-box { | ||
background-color: #e6f0ff; | ||
border-radius: 5px; | ||
padding: 20px; | ||
} | ||
|
||
.green-box { | ||
background-color: #d9ffe9; | ||
border-radius: 5px; | ||
padding: 20px; | ||
} | ||
|
||
.orange-box { | ||
background-color: #ffeedf; | ||
border-radius: 5px; | ||
padding: 20px; | ||
} |
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,4 @@ | ||
name: United HTML Document | ||
description: > | ||
A single-document template using the united bootstrap theme | ||
create_dir: FALSE |
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,12 @@ | ||
\name{hello} | ||
\alias{hello} | ||
\title{Hello, World!} | ||
\usage{ | ||
hello() | ||
} | ||
\description{ | ||
Prints 'Hello, world!'. | ||
} | ||
\examples{ | ||
hello() | ||
} |
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,20 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX | ||
|
||
AutoAppendNewline: Yes | ||
StripTrailingWhitespace: Yes | ||
|
||
BuildType: Package | ||
PackageUseDevtools: Yes | ||
PackageInstallArgs: --no-multiarch --with-keep.source |