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

add optional rounding for expct and forge #31

Merged
merged 6 commits into from
Jun 11, 2024
Merged

Conversation

jkapar
Copy link
Collaborator

@jkapar jkapar commented Jun 10, 2024

No description provided.

R/utils.R Outdated
@@ -170,7 +171,7 @@ post_x <- function(x, params) {
}
if (sum(idx_integer) > 0L) {
x[, idx_integer] <- lapply(idx_integer, function(j) {
if (is.numeric(x[[j]])) {
if (is.numeric(x[[j]]) & round) {
Copy link
Member

Choose a reason for hiding this comment

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

For round==FALSE, the numeric value is converted to character first, effectively (I think) rounding down.

@jkapar jkapar requested a review from mnwright June 11, 2024 10:08
Copy link
Member

@mnwright mnwright left a comment

Choose a reason for hiding this comment

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

Looks good now.

@mnwright mnwright merged commit 1faedb1 into main Jun 11, 2024
6 checks passed
@mnwright mnwright deleted the optional_rounding branch June 11, 2024 14:28
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