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

Bug - Fix tidy_multi_single_dist() Fails on distribution with single parameter #100

Closed
spsanderson opened this issue Mar 18, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@spsanderson
Copy link
Owner

No description provided.

@spsanderson spsanderson self-assigned this Mar 18, 2022
@spsanderson spsanderson added the bug Something isn't working label Mar 18, 2022
@spsanderson spsanderson added this to the TidyDensity v1.0.1 milestone Mar 18, 2022
@spsanderson
Copy link
Owner Author

  # Get column names from the param_grid in order to make the dist_type column ----
  cols <- names(param_grid %>% dplyr::select(-c(.n, .num_sims)))
  
  if (length(cols) == 1){
    dff$dist_name <- paste0(dist_type, " c(", dff[, cols], ")")
  } else {
    dff$dist_name <- paste0(
      paste0(dist_type, " c("),
      apply(dff[, cols], 1, paste0, collapse = ", "),
      ")"
    )
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant