datazoom.amazonia icon indicating copy to clipboard operation
datazoom.amazonia copied to clipboard

IPS README example #2 error

Open lauratregadas opened this issue 3 years ago • 0 comments

As I tried to run the available code, I encountered the following error message:

Error in dplyr::bind_cols(): ! Can't recycle ..1 (size 3865) to match ..2 (size 773). Run rlang::last_error() to see where the error occurred.

rlang::last_error() <error/vctrs_error_incompatible_size> Error in dplyr::bind_cols(): ! Can't recycle ..1 (size 3865) to match ..2 (size 773).


Backtrace:

  1. datazoom.amazonia::load_ips(...)
  2. dplyr::bind_cols(year, df)
  3. vctrs::vec_cbind(!!!dots, .name_repair = .name_repair) Run rlang::last_trace() to see the full context.

rlang::last_trace() <error/vctrs_error_incompatible_size> Error in dplyr::bind_cols(): ! Can't recycle ..1 (size 3865) to match ..2 (size 773).


Backtrace: ▆

  1. ├─datazoom.amazonia::load_ips(...)
  2. │ └─dplyr::bind_cols(year, df)
  3. │ ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
  4. │ │ └─base::withCallingHandlers(...)
  5. │ └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
  6. └─vctrs::stop_incompatible_size(...)
  7. └─vctrs:::stop_incompatible(...)
  8. └─vctrs:::stop_vctrs(...)
    
  9.   └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
    

I tried running the code with multiple time periods and the issue only happened when trying to cover three or more years.

lauratregadas avatar Sep 17 '22 18:09 lauratregadas