-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
182 lines (119 loc) · 5.74 KB
/
README.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
<!-- badges: start -->
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/addins.rmd)](https://cran.r-project.org/package=addins.rmd)
[![GitHub version](https://img.shields.io/badge/GitHub-`r packageVersion("addins.rmd")`-brightgreen.svg)](https://github.com/GegznaV/addins.rmd)
[![R-CMD-check](https://github.com/GegznaV/addins.rmd/workflows/R-CMD-check/badge.svg)](https://github.com/GegznaV/addins.rmd/actions)
[![Updated-on](https://img.shields.io/badge/Updated%20on-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)](/commits/master)
<!-- badges: end -->
***
<!--
```{r, fig.align='center', out.height='30%', out.width='30%', echo=FALSE, eval = FALSE}
# knitr::include_graphics("http://gegznav.github.io/addins.rmd/logo.png")
```
-->
<img src="http://gegznav.github.io/addins.rmd/logo.png" align="right" width="15%" height="15%"/>
# R package **addins.rmd**
Package `addins.rmd` is an *R* package that provides a set of *RStudio* add-ins for *R Markdown*. The main purpose of this package is to alleviate learning process of *R Markdown* syntax.
<!--
1) **format text in R Markdown documents**:
- **enclose** either selected text or selected rows with special symbols and text gets inerpreted in a special way when rendered with R Markdown (e.g., converts "bold" into "\*\*bold\*\*"
that is interpreted as "**bold**").
2) **insert** text (e.g., operators `%>%`, `<<-`, `%$%`) at the cursor position;
3) **replace** symbols in selected
pieces of text (e.g., convert backslashes to forward slashes which results
in strings like `"c:\data\"` converted into `"c:/data/"`).
-->
## Install Package
Install package from CRAN-like repository:
```{r Install package from CRAN, eval=FALSE}
repos <- c("https://mokymai.github.io/download/", getOption("repos"))
install.packages("addins.rmd", repos = repos)
```
<details>
<summary>Install from GitHub</summary>
Install development version from GitHub:
```{r Install package from GitHub, eval=FALSE}
if (!require(remotes)) {
install.packages("remotes")
}
remotes::install_github("GegznaV/addin.tools")
remotes::install_github("GegznaV/addins.rmd")
```
</details>
# How to Use Thse Add-ins
<!--
Recommended workflow and a few examples
-----------------------------------------------------
Get started online http://gegznav.github.io/addins.rmd/articles/v1_workflow.html
And offline:
```{r, eval=FALSE}
vignette("v1_workflow", package = "addins.rmd")
```
browseVignettes("addins.rmd")
-->
For the current version of the package:
1) Find and click *RStudio* "Addins" button;
2) Type **`{Rmd}`** in the add-ins search box;
3) All the add-ins of the package **addins.rmd** will be displayed in the drop-down list below.
```{r steps-search-addins, echo=FALSE, fig.cap=CAPTION, out.width=400}
knitr::include_graphics("https://gegznav.github.io/addins.rmd/figs/steps-search-addins.png")
CAPTION <- "**Fig. 1.** Steps to find addins of the package **addins.rmd**. "
```
Below you can find a few examples how to use the add-ins of the package.
## Convert Text into Headings
```{r fig-ID-1, echo=FALSE, fig.cap=CAPTION, out.width=600}
CAPTION <- "**Fig. 2.** **Demonstration 1: headings.**
Place a cursor with a mouse and use a necessary add-in.
*(In this demonstrations, older version of the package is used.)*"
knitr::include_graphics("https://gegznav.github.io/addins.rmd/figs/demo-headings-1.gif")
```
<br>
```{r fig-ID-2, echo=FALSE, fig.cap=CAPTION, out.width=600}
CAPTION <- "**Fig. 3.** Demonstration 2: headings.** Notice that, if needed, a blank line above the selection is added. "
knitr::include_graphics("https://gegznav.github.io/addins.rmd/figs/demo-headings-2.gif")
```
## Basic Text Formatting
```{r fig-ID-3, echo=FALSE, fig.cap=CAPTION, out.width=600}
CAPTION <- "**Fig. 4.** **Demonstration 3: basic formatting.**
Before using this type of add-in, select a piece of text that should be formatted.
*(In this demonstrations, older version of the package is used.)* "
knitr::include_graphics("https://gegznav.github.io/addins.rmd/figs/demo-formatting-1.gif")
```
## Create Lists
```{r fig-ID-4, echo=FALSE, fig.cap=CAPTION, out.width=600}
CAPTION <- "**Fig. 5.** **Demonstration 4: lists.**
The lists can be numbered and unnumbered.
They can have several levels.
*(In this demonstrations, older version of the package is used.)* "
knitr::include_graphics("https://gegznav.github.io/addins.rmd/figs/demo-lists-1.gif")
```
## Create R Code Chunks
```{r demo-chunk-add-1, echo=FALSE, fig.cap=CAPTION, out.width=600}
CAPTION <- "**Fig. 6.** **Demonstration 5: R code chunks.**
Select one or several lines with code, select an appropriate add-in and include code into a chunk. "
knitr::include_graphics("https://gegznav.github.io/addins.rmd/figs/demo-chunk-add-1.gif")
```
# See Also
Use the links below to learn more about RStudio add-ins
and especially how to use them in combination with user-defined
keyboard shortcuts:
1. [RStudio add-ins](https://rstudio.github.io/rstudioaddins/);
2. [Keyboard shortcuts](https://rstudio.github.io/rstudioaddins/#keyboard-shorcuts);
3. [Customizing keyboard shortcuts.](https://support.rstudio.com/hc/en-us/articles/206382178-Customizing-Keyboard-Shortcuts)
## Pandoc's Markdown
*R Markdown* syntax is based on Pandoc's Markdown syntax.
If you need more advanced formatting options, please, read more at:
- [https://pandoc.org/MANUAL.html#pandocs-markdown](https://pandoc.org/MANUAL.html#pandocs-markdown){target="_blank"}
***
Online docuentation at http://gegznav.github.io/addins.rmd/