https://github.com/poissonconsulting/yesno
An R package to ask Yes-No questions with variable or custom responses
https://github.com/poissonconsulting/yesno
cran r rstats yesno
Last synced: 4 months ago
JSON representation
An R package to ask Yes-No questions with variable or custom responses
- Host: GitHub
- URL: https://github.com/poissonconsulting/yesno
- Owner: poissonconsulting
- License: other
- Created: 2016-09-30T01:15:09.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T20:30:03.000Z (6 months ago)
- Last Synced: 2024-10-20T06:36:38.883Z (6 months ago)
- Topics: cran, r, rstats, yesno
- Language: R
- Homepage: https://poissonconsulting.github.io/yesno/
- Size: 1.34 MB
- Stars: 9
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
- jimsghstars - poissonconsulting/yesno - An R package to ask Yes-No questions with variable or custom responses (R)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# yesno
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://github.com/poissonconsulting/yesno/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/poissonconsulting/yesno)
[](https://opensource.org/license/mit/)
[](https://cran.r-project.org/package=yesno)
## 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: NoSelection: 1
[1] TRUEyesno("Do you like ", R.Version()$nickname ,"?")
Do you like Bug in Your Hair?
1: No way
2: Uhhhh... Maybe?
3: I agreeSelection: 2
[1] FALSE> yesno2("Do you like this question?", yes = "I really do")
Do you like this question?
1: I really do
2: NoSelection: 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.