r-lib / vctrs

Generic programming with typed R vectors

Home Page:https://vctrs.r-lib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problems with vctrs/dplyr packages in R

yairamitai opened this issue · comments

Hi, I'm trying to reshape my data from wide to long. I am using the reshape command mainly because I have more than one column in the new data that should be long. I'm getting the following error:

Backtrace:

  1. ├─stats::reshape(...)
  2. │ └─stats (local) reshapeLong(...)
  3. │ ├─base::do.call(...)
  4. │ └─base (local) <fn>(...)
  5. │ └─dplyr (local) rbind(deparse.level, ...)
  6. │ └─dplyr::bind_rows(...)
  7. │ └─vctrs::vec_rbind(!!!dots, .names_to = .id, .error_call = current_env())
  8. │ └─vctrs (local) <fn>()
  9. │ └─vctrs (local) vec_cast.grouped_df.grouped_df(...)
  10. │ └─vctrs:::gdf_cast(x, to, ...)
  11. │ └─dplyr::grouped_df(df, vars, drop = drop)
  12. │ └─dplyr:::compute_groups(data, vars, drop = drop)
  13. │ └─dplyr:::dplyr_locate_sorted_groups(group_vars)
  14. │ └─vctrs::vec_locate_sorted_groups(x, nan_distinct = TRUE)
  15. └─rlang:::stop_internal_c_lib(...)
  16. └─rlang::abort(message, call = call, .internal = TRUE, .frame = frame)

When I tried to write a reprex for my data, the command actually worked. Even when I reinstall the packages "vctrs" and "dplyr," the command works again, but other commands like drop_na suddenly don't. I'm quite confused. I would appreciate some help!

Unfortunately it is quite hard for us to guess at the problem without a reprex 😢