-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
87 lines (63 loc) · 2.54 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
---
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-"
)
```
# yesno <img src="man/figures/logo.png" align="right" />
<!-- badges: start -->
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![R-CMD-check](https://github.com/poissonconsulting/yesno/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/yesno/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/yesno/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/yesno)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit/)
[![CRAN status](https://www.r-pkg.org/badges/version/yesno)](https://cran.r-project.org/package=yesno)
![CRAN downloads](https://cranlogs.r-pkg.org/badges/yesno)
<!-- badges: end -->
## Introduction
Provides two functions.
The first, `yesno()`, asks a custom yes-no question with three variable responses.
The order and phrasing of the possible responses varies randomly to ensure the user consciously chooses (as opposed to automatically types their response).
The second, `yesno2()`, ask a yes-no question with two custom responses.
## Installation
To install the latest release from [CRAN](https://cran.r-project.org)
```{r, eval=FALSE}
install.packages("yesno")
```
To install the developmental version from [GitHub](https://github.com/poissonconsulting/yesno)
```{r, eval=FALSE}
# install.packages("remotes")
remotes::install_github("poissonconsulting/yesno")
```
## Demonstration
```
yesno("Do you like ", R.Version()$nickname ,"?")
Do you like Bug in Your Hair?
1: Definitely
2: No way
3: No
Selection: 1
[1] TRUE
yesno("Do you like ", R.Version()$nickname ,"?")
Do you like Bug in Your Hair?
1: No way
2: Uhhhh... Maybe?
3: I agree
Selection: 2
[1] FALSE
> yesno2("Do you like this question?", yes = "I really do")
Do you like this question?
1: I really do
2: No
Selection: 1
[1] TRUE
```
## Contribution
Please report any [issues](https://github.com/poissonconsulting/yesno/issues).
[Pull requests](https://github.com/poissonconsulting/yesno/pulls) are always welcome.
## Code of Conduct
Please note that the yesno project is released with a [Contributor Code of Conduct](https://poissonconsulting.github.io/yesno/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.