Ask Yes-No Questions

Asks Yes-No questions with variable or custom responses.


yesno

Lifecycle:stable R-CMD-check Codecov testcoverage License:MIT CRANstatus CRAN downloads

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

install.packages("yesno")

To install the developmental version from GitHub

# 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.

Pull requests are always welcome.

Code of Conduct

Please note that the yesno project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("yesno")

0.1.3 by Ayla Pearson, 2 years ago


https://github.com/poissonconsulting/yesno, https://poissonconsulting.github.io/yesno/


Report a bug at https://github.com/poissonconsulting/yesno/issues


Browse source code at https://github.com/cran/yesno


Authors: Ayla Pearson [cre] , Joe Thorley [aut, cph] , Hadley Wickham [aut, cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports utils

Suggests testthat


Imported by available, contactsurveys, greta, jdenticon, labNorm, pacta.multi.loanbook, qpost, rcicr, rjtools, settingsSync, shiny2docker, sims, ypr.


See at CRAN