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

Implement push_back and push_front for DataFrame. #1099

Merged
merged 7 commits into from
Aug 4, 2020
Merged

Implement push_back and push_front for DataFrame. #1099

merged 7 commits into from
Aug 4, 2020

Commits on Jul 7, 2020

  1. Implement push_back and push_front for DataFrame.

    This explicitly defines push_back and push_back methods for DataFrame
    which copies row.names and class attributes from the original object.
    
    This fixes #1094 where these operations converted the object to a list.
    
    Tests for this behavior are also implemented.
    waltersom authored and eddelbuettel committed Jul 7, 2020
    Configuration menu
    Copy the full SHA
    587b342 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d37dae3 View commit details
    Browse the repository at this point in the history
  3. Modify approach to copying attributes.

    Make use of the fact set__() already does a conversion, and just use
    that. This has the benefit that it works with push_back(DataFrame), as
    well as push_back(Vector), and also handles adding vectors of different
    lengths properly.
    waltersom authored and eddelbuettel committed Jul 7, 2020
    Configuration menu
    Copy the full SHA
    fab8b38 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2020

  1. Add in warning when DataFrame created will have incorrect rows.

    With this commit, if after a push_back the row count of the DataFrame would
    be invalid, a warning is generated. The type is then not coerced to a
    DataFrame, but left as a list.
    
    In future, this could instead `stop()`.
    waltersom committed Jul 9, 2020
    Configuration menu
    Copy the full SHA
    d800e2a View commit details
    Browse the repository at this point in the history
  2. Correct behaviour when pushing zero-length object to DataFrame.

    This triggers the warning when adding a zero-length object to a
    DataFrame. It is not a valid DataFrame, so calls `warning()`, and doesn't
    call `as.data.frame()`.
    waltersom committed Jul 9, 2020
    Configuration menu
    Copy the full SHA
    2bfd0d1 View commit details
    Browse the repository at this point in the history
  3. Correct failing test.

    waltersom committed Jul 9, 2020
    Configuration menu
    Copy the full SHA
    89b69dd View commit details
    Browse the repository at this point in the history
  4. correct ChangeLog

    eddelbuettel committed Jul 9, 2020
    Configuration menu
    Copy the full SHA
    ff14167 View commit details
    Browse the repository at this point in the history