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

merge_samples checks for single value before coercing to numeric #893

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 5, 2018

  1. merge_samples checks for single value before coercing to numeric

    Currently merge_samples forces everything to a numeric before the
    (parameterized) merge function is applied to the resulting vectors.
    This loses all character information (since characters are coerced to
    NA) and usable factor information (since the mapping between values and
    levels are lost).
    
    This update first checks to see if there is just a single value in each
    group, and if so returns that single value, before applying the current
    coerce/mean approach. This preserves character values when they are the
    same within the merged group.
    
    It also gives users more power to provide a custom funciton to handle
    merging, as the numeric coersion is no longer hardcoded into the
    method, but is not inside the `fun` argument.
    bcallah authored and bcallah committed Mar 5, 2018
    Configuration menu
    Copy the full SHA
    60d43e6 View commit details
    Browse the repository at this point in the history