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

Error while using vis_dat with diamonds dataset #75

Closed
nitingupta2 opened this Issue Mar 29, 2018 · 2 comments

Comments

Projects
2 participants
@nitingupta2
Copy link

nitingupta2 commented Mar 29, 2018

Here is the error I get when I use vis_dat with diamonds dataset:

visdat::vis_dat(diamonds)
Error in mutate_impl(.data, dots) :
Evaluation error: argument must be coercible to non-negative integer.
In addition: Warning message:
In seq_len(nrow(x)) : first element used of 'length.out' argument

@njtierney

This comment has been minimized.

Copy link
Collaborator

njtierney commented Apr 2, 2018

Thank you for filing this issue!

Just confirming that I get the same error:

visdat::vis_dat(ggplot2::diamonds)
#> Warning in seq_len(nrow(x)): first element used of 'length.out' argument
#> Error in mutate_impl(.data, dots): Evaluation error: argument must be coercible to non-negative integer.

Created on 2018-04-03 by the reprex package (v0.2.0).

@njtierney njtierney added the bug label Apr 2, 2018

@njtierney njtierney added this to To do in CRAN 5.0 release Apr 5, 2018

@njtierney njtierney added the V0.5.0 label Jun 4, 2018

@njtierney njtierney added this to the V0.2.0 milestone Jun 5, 2018

@njtierney njtierney removed the V0.5.0 label Jun 6, 2018

njtierney added a commit that referenced this issue Jun 6, 2018

Fix error reported in #75
  where `vis_dat(diamonds)` errored `seq_len(nrow(x))` inside internal
  function `vis_gather_`, used to calculate the row numbers. Using
  `mutate(rows = dplyr::row_number())` solved the issue.
@njtierney

This comment has been minimized.

Copy link
Collaborator

njtierney commented Jun 6, 2018

Thank you for reporting this! This was a bug, fixed by using a better way to create a row number column in a dataframe - see this [line here](4878053#diff-1b62d1c1d07f967b6ebe9bbd20df1348R10

This should now be fixed:

library(ggplot2)
library(visdat)
packageVersion("visdat")
#> [1] '0.2.4.9000'
vis_dat(diamonds)

Created on 2018-06-07 by the reprex package (v0.2.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.