GithubHelp home page GithubHelp logo

Error in Breaks not unique about skimr HOT 4 CLOSED

ropensci avatar ropensci commented on May 19, 2024
Error in Breaks not unique

from skimr.

Comments (4)

npjc avatar npjc commented on May 19, 2024

👍

Would be great if pesky variables which do NOT vary would work:

library(skimr)
x = rep(0, 5)
d <- data.frame(x)
d
#>   x
#> 1 0
#> 2 0
#> 3 0
#> 4 0
#> 5 0

skim(d)
#> Error in cut.default(x, 10): 'breaks' are not unique

i.e. maybe fallback on something else when cut.default gets upset:

cut.default(x, 10)
#> Error in cut.default(x, 10): 'breaks' are not unique

session_info()

devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.4.0 (2017-04-21)
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_CA.UTF-8                 
#>  tz       America/Vancouver           
#>  date     2017-05-31
#> Packages -----------------------------------------------------------------
#>  package    * version    date       source                             
#>  assertthat   0.2.0      2017-04-11 CRAN (R 3.4.0)                     
#>  backports    1.1.0      2017-05-22 CRAN (R 3.4.0)                     
#>  base       * 3.4.0      2017-04-21 local                              
#>  compiler     3.4.0      2017-04-21 local                              
#>  datasets   * 3.4.0      2017-04-21 local                              
#>  devtools     1.13.1     2017-05-13 CRAN (R 3.4.0)                     
#>  digest       0.6.12     2017-01-27 CRAN (R 3.4.0)                     
#>  dplyr        0.6.0      2017-06-01 Github (tidyverse/dplyr@b064c4b)   
#>  evaluate     0.10       2016-10-11 CRAN (R 3.4.0)                     
#>  glue         1.0.0.9000 2017-06-01 Github (tidyverse/glue@0479f1b)    
#>  graphics   * 3.4.0      2017-04-21 local                              
#>  grDevices  * 3.4.0      2017-04-21 local                              
#>  htmltools    0.3.6      2017-04-28 CRAN (R 3.4.0)                     
#>  knitr        1.16       2017-05-18 CRAN (R 3.4.0)                     
#>  magrittr     1.5        2014-11-22 CRAN (R 3.4.0)                     
#>  memoise      1.1.0      2017-04-21 CRAN (R 3.4.0)                     
#>  methods    * 3.4.0      2017-04-21 local                              
#>  purrr        0.2.2.2    2017-05-11 CRAN (R 3.4.0)                     
#>  R6           2.2.1      2017-05-10 cran (@2.2.1)                      
#>  Rcpp         0.12.11    2017-05-22 CRAN (R 3.4.0)                     
#>  rlang        0.1.1.9000 2017-05-27 Github (tidyverse/rlang@c351186)   
#>  rmarkdown    1.5        2017-04-26 CRAN (R 3.4.0)                     
#>  rprojroot    1.2        2017-01-16 CRAN (R 3.4.0)                     
#>  skimr      * 1.0        2017-06-01 Github (ropenscilabs/skimr@766cab0)
#>  stats      * 3.4.0      2017-04-21 local                              
#>  stringi      1.1.5      2017-04-07 CRAN (R 3.4.0)                     
#>  stringr      1.2.0      2017-02-18 CRAN (R 3.4.0)                     
#>  tibble       1.3.3      2017-05-28 cran (@1.3.3)                      
#>  tidyr        0.6.3      2017-05-15 CRAN (R 3.4.0)                     
#>  tools        3.4.0      2017-04-21 local                              
#>  utils      * 3.4.0      2017-04-21 local                              
#>  withr        1.0.2      2016-06-20 CRAN (R 3.4.0)                     
#>  yaml         2.1.14     2016-11-12 CRAN (R 3.4.0)

from skimr.

gshotwell avatar gshotwell commented on May 19, 2024

I think this is fixed here: gshotwell@e0071ea

I was waiting to bring it over in the grouped_df PR when we figure out the output stuff.

from skimr.

elinw avatar elinw commented on May 19, 2024

Why don't you do a separate PR for that?

from skimr.

elinw avatar elinw commented on May 19, 2024

From testing it seems like all 0s is the issue not having no variation in general.

Fixed by #81

from skimr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.