Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix of check in color_def() of col being NA #2167

Merged
merged 1 commit into from
Sep 6, 2022
Merged

Fix of check in color_def() of col being NA #2167

merged 1 commit into from
Sep 6, 2022

Conversation

nielsrhansen
Copy link
Contributor

As of R 4.2.0, "Calling if() with a condition of length greater than one gives an error rather than a warning." The utility function color_def() tests if the argument col is NA by if(is.na(col)), which with R 4.2.0 or greater results in an error when e.g. supplying a user specified background color for chunks in an Rnw-file. The proposed change fixes that by converting is.na(col) to length one.

As of R 4.2.0, "Calling if() with a condition of length greater than one gives an error rather than a warning." The utility function color_def() tests if the argument col is NA by if(is.na(col)), which with R 4.2.0 or greater results in an error when e.g. supplying a user specified background color for chunks in an Rnw-file. The proposed change fixes that by converting is.na(col) to length one.
@CLAassistant
Copy link

CLAassistant commented Sep 6, 2022

CLA assistant check
All committers have signed the CLA.

@nielsrhansen nielsrhansen closed this by deleting the head repository Sep 6, 2022
@nielsrhansen nielsrhansen reopened this Sep 6, 2022
Copy link
Owner

@yihui yihui left a comment

Choose a reason for hiding this comment

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

Thank you!

@yihui yihui merged commit 73ff17b into yihui:master Sep 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants