Skip to content

Added verbatim_logical as.yaml handler.#133

Merged
spgarbet merged 2 commits intor-lib:masterfrom
dupontct:logical-true-false
Nov 27, 2023
Merged

Added verbatim_logical as.yaml handler.#133
spgarbet merged 2 commits intor-lib:masterfrom
dupontct:logical-true-false

Conversation

@dupontct
Copy link
Copy Markdown
Contributor

This pull request adds a handler the will emit true/false instead of yes/no when used with as.yaml.

vector <- c(TRUE, FALSE, TRUE)
> cat(as.yaml(vector))
- yes
- no
- yes

cat(as.yaml(vector, handlers=list(logical=verbatim_logical)))
- true
- false
- true

Copy link
Copy Markdown
Collaborator

@spgarbet spgarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you bump DESCRIPTION and VERSION to 2.3.8 and add an example in README.md ?

Bumped version to 2.3.8 in DESCRIPTION and VERSION files.
Added examples using verbatim_logical to both the README.md and
man/as.yaml.Rd files.
@spgarbet spgarbet merged commit bd25b35 into r-lib:master Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants