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: nm must be NULL or a character vector the same length as x #87

Open
smmurphy opened this issue Jan 31, 2020 · 3 comments
Open

Error: nm must be NULL or a character vector the same length as x #87

smmurphy opened this issue Jan 31, 2020 · 3 comments

Comments

@smmurphy
Copy link

Thank you so much for this package and for your talk at the RStudio conference where I just learned about it! These tools are tremendously helpful and I am making good use of them already today. One issue I just ran into is the error below,

library(tsibble)
library(brolgar)
wages <- as_tsibble(x = wages,
                    key = id,
                    index = xp,
                    regular = FALSE)

wages_slope <- key_slope(wages, ln_wages ~ xp) 
#> Error: `nm` must be `NULL` or a character vector the same length as `x`

Created on 2020-01-31 by the reprex package (v0.3.0)

I see a version of this error referenced here:

tidyverse/dplyr#3042

And am starting to look into the function to see if I can catch what's going on, but would appreciate any guidance you may have in tracing this down.

Other examples have been working great so far. Thanks for your great work on this!

@njtierney
Copy link
Owner

Thank you very much for your kind words 😄 and for logging an issue with a reprex! 🚀

I have run into this issue before, but I can't remember what I did to solve it - unfortunately I cannot reproduce this error:

library(tsibble)
library(brolgar)
wages <- as_tsibble(x = wages,
                    key = id,
                    index = xp,
                    regular = FALSE)

wages_slope <- key_slope(wages, ln_wages ~ xp) 

wages_slope
#> # A tibble: 888 x 3
#>       id .intercept .slope_xp
#>    <int>      <dbl>     <dbl>
#>  1    31       1.41    0.101 
#>  2    36       2.04    0.0588
#>  3    53       2.29   -0.358 
#>  4   122       1.93    0.0374
#>  5   134       2.03    0.0831
#>  6   145       1.59    0.0469
#>  7   155       1.66    0.0867
#>  8   173       1.61    0.100 
#>  9   206       1.73    0.180 
#> 10   207       1.62    0.0884
#> # … with 878 more rows

Created on 2020-02-01 by the reprex package (v0.3.0)

Session info
devtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.6.1 (2019-07-05)
#>  os       macOS Mojave 10.14.6        
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_AU.UTF-8                 
#>  ctype    en_AU.UTF-8                 
#>  tz       America/Los_Angeles         
#>  date     2020-02-01                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date       lib source                         
#>  anytime       0.3.6      2019-08-29 [1] CRAN (R 3.6.0)                 
#>  assertthat    0.2.1      2019-03-21 [1] CRAN (R 3.6.0)                 
#>  backports     1.1.5      2019-10-02 [1] CRAN (R 3.6.0)                 
#>  brolgar     * 0.0.5.9100 2019-12-18 [1] local                          
#>  callr         3.4.1      2020-01-24 [1] CRAN (R 3.6.1)                 
#>  cli           2.0.1      2020-01-08 [1] CRAN (R 3.6.0)                 
#>  colorspace    1.4-1      2019-03-18 [1] CRAN (R 3.6.0)                 
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.6.0)                 
#>  desc          1.2.0      2018-05-01 [1] CRAN (R 3.6.0)                 
#>  devtools      2.2.1      2019-09-24 [1] CRAN (R 3.6.0)                 
#>  digest        0.6.23     2019-11-23 [1] CRAN (R 3.6.0)                 
#>  dplyr         0.8.3      2019-07-04 [1] CRAN (R 3.6.0)                 
#>  ellipsis      0.3.0      2019-09-20 [1] CRAN (R 3.6.1)                 
#>  evaluate      0.14       2019-05-28 [1] CRAN (R 3.6.0)                 
#>  fabletools    0.1.1      2019-09-16 [1] CRAN (R 3.6.0)                 
#>  fansi         0.4.1      2020-01-08 [1] CRAN (R 3.6.0)                 
#>  fs            1.3.1      2019-05-06 [1] CRAN (R 3.6.0)                 
#>  generics      0.0.2      2018-11-29 [1] CRAN (R 3.6.0)                 
#>  ggplot2       3.2.1      2019-08-10 [1] CRAN (R 3.6.0)                 
#>  glue          1.3.1.9000 2019-07-29 [1] Github (tidyverse/glue@423b7e5)
#>  gtable        0.3.0      2019-03-25 [1] CRAN (R 3.6.0)                 
#>  highr         0.8        2019-03-20 [1] CRAN (R 3.6.0)                 
#>  htmltools     0.4.0      2019-10-04 [1] CRAN (R 3.6.0)                 
#>  knitr         1.27       2020-01-16 [1] CRAN (R 3.6.0)                 
#>  lazyeval      0.2.2      2019-03-15 [1] CRAN (R 3.6.0)                 
#>  lifecycle     0.1.0      2019-08-01 [1] CRAN (R 3.6.0)                 
#>  lubridate     1.7.4      2018-04-11 [1] CRAN (R 3.6.0)                 
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.6.0)                 
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 3.6.0)                 
#>  munsell       0.5.0      2018-06-12 [1] CRAN (R 3.6.0)                 
#>  pillar        1.4.3      2019-12-20 [1] CRAN (R 3.6.0)                 
#>  pkgbuild      1.0.6      2019-10-09 [1] CRAN (R 3.6.0)                 
#>  pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 3.6.0)                 
#>  pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.6.0)                 
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 3.6.1)                 
#>  processx      3.4.1      2019-07-18 [1] CRAN (R 3.6.1)                 
#>  ps            1.3.0      2018-12-21 [1] CRAN (R 3.6.0)                 
#>  purrr         0.3.3.9000 2020-01-31 [1] local                          
#>  R6            2.4.1      2019-11-12 [1] CRAN (R 3.6.0)                 
#>  Rcpp          1.0.3      2019-11-08 [1] CRAN (R 3.6.0)                 
#>  remotes       2.1.0      2019-06-24 [1] CRAN (R 3.6.0)                 
#>  rlang         0.4.4      2020-01-28 [1] CRAN (R 3.6.1)                 
#>  rmarkdown     2.1        2020-01-20 [1] CRAN (R 3.6.0)                 
#>  rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.6.0)                 
#>  scales        1.1.0      2019-11-18 [1] CRAN (R 3.6.0)                 
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.6.0)                 
#>  stringi       1.4.5      2020-01-11 [1] CRAN (R 3.6.1)                 
#>  stringr       1.4.0      2019-02-10 [1] CRAN (R 3.6.0)                 
#>  testthat      2.3.1      2019-12-13 [1] local                          
#>  tibble        2.1.3      2019-06-06 [1] CRAN (R 3.6.0)                 
#>  tidyr         1.0.0      2019-09-11 [1] CRAN (R 3.6.0)                 
#>  tidyselect    0.2.5      2018-10-11 [1] CRAN (R 3.6.0)                 
#>  tsibble     * 0.8.5      2019-11-03 [1] CRAN (R 3.6.0)                 
#>  usethis       1.5.1.9000 2019-12-16 [1] Github (r-lib/usethis@b2e894e) 
#>  utf8          1.1.4      2018-05-24 [1] CRAN (R 3.6.0)                 
#>  vctrs         0.2.2      2020-01-24 [1] CRAN (R 3.6.1)                 
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.6.0)                 
#>  xfun          0.12       2020-01-13 [1] CRAN (R 3.6.0)                 
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.6.0)                 
#> 
#> [1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library

Could you add your session info? Perhaps I've got some dev version of some package.

Thanks again!

Cheers,

Nick

@smmurphy
Copy link
Author

smmurphy commented Feb 3, 2020

Session info below, thanks again!

Session Info
devtools::session_info()
─ Session info ────────────────────────────────────
 setting  value                       
 version  R version 3.6.2 (2019-12-12)
 os       Ubuntu 18.04.3 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/New_York            
 date     2020-02-02Packages ────────────────────────────────────────
 package     * version     date       lib
 anytime       0.3.7       2020-01-20 [1]
 assertthat    0.2.1       2019-03-21 [1]
 backports     1.1.5       2019-10-02 [1]
 brolgar     * 0.0.5.9100  2020-01-31 [1]
 callr         3.4.1       2020-01-24 [1]
 cli           2.0.1       2020-01-08 [1]
 clipr         0.6.0       2019-04-15 [1]
 colorspace    1.4-1       2019-03-18 [1]
 crayon        1.3.4       2017-09-16 [1]
 desc          1.2.0       2018-05-01 [1]
 devtools      2.0.2       2019-04-08 [1]
 digest        0.6.23      2019-11-23 [1]
 dplyr       * 0.8.3       2019-07-04 [1]
 ellipsis      0.3.0       2019-09-20 [1]
 evaluate      0.14        2019-05-28 [1]
 fabletools    0.1.2       2020-01-29 [1]
 fansi         0.4.1       2020-01-08 [1]
 fs            1.3.1       2019-05-06 [1]
 generics      0.0.2       2018-11-29 [1]
 ggplot2       3.2.0       2019-06-16 [1]
 glue          1.3.1       2019-03-12 [1]
 gtable        0.3.0       2019-03-25 [1]
 htmltools     0.3.6       2017-04-28 [1]
 knitr         1.23        2019-05-18 [1]
 lazyeval      0.2.2       2019-03-15 [1]
 lifecycle     0.1.0       2019-08-01 [1]
 lubridate     1.7.4       2018-04-11 [1]
 magrittr      1.5         2014-11-22 [1]
 memoise       1.1.0       2017-04-21 [1]
 munsell       0.5.0       2018-06-12 [1]
 packrat       0.5.0-16    2019-07-20 [1]
 pillar        1.4.3       2019-12-20 [1]
 pkgbuild      1.0.3       2019-03-20 [1]
 pkgconfig     2.0.3       2019-09-22 [1]
 pkgload       1.0.2       2018-10-29 [1]
 prettyunits   1.0.2       2015-07-13 [1]
 processx      3.4.0       2019-07-03 [1]
 ps            1.3.0       2018-12-21 [1]
 purrr         0.3.3       2019-10-18 [1]
 R6            2.4.1       2019-11-12 [1]
 Rcpp          1.0.3       2019-11-08 [1]
 remotes       2.0.4       2019-04-10 [1]
 reprex      * 0.3.0       2019-05-16 [1]
 rlang         0.4.4       2020-01-28 [1]
 rmarkdown     1.14        2019-07-12 [1]
 rprojroot     1.3-2       2018-01-03 [1]
 rstudioapi    0.10        2019-03-19 [1]
 scales        1.0.0       2018-08-09 [1]
 sessioninfo   1.1.1       2018-11-05 [1]
 stringi       1.4.5       2020-01-11 [1]
 stringr       1.4.0       2019-02-10 [1]
 tibble        2.1.3       2019-06-06 [1]
 tidyr         0.8.3       2019-03-01 [1]
 tidyselect    1.0.0       2020-01-27 [1]
 tsibble     * 0.8.9.9000  2020-01-31 [1]
 usethis       1.5.0       2019-04-07 [1]
 vctrs         0.2.99.9005 2020-01-31 [1]
 whisker       0.3-2       2013-04-28 [1]
 withr         2.1.2       2018-03-15 [1]
 xfun          0.8         2019-06-25 [1]
 source                            
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 Github (njtierney/brolgar@d70649d)
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 Github (rstudio/packrat@d7ad4c2)  
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.2)                    
 Github (tidyverts/tsibble@56054a6)
 CRAN (R 3.6.0)                    
 Github (r-lib/vctrs@4de0297)      
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.1)                    

[1] /home/sean/R/x86_64-pc-linux-gnu-library/3.6
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library

@njtierney
Copy link
Owner

Hi @smmurphy are you able to replicate this error now? Just looking to close up issues. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants