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

Error in 'vec_rbind()'

REH2022 opened this issue · comments

Hello, while running code in R on Sherlock, I had the following error code. Thanks in advance for your help.

Error in vec_rbind():
! Negative n in compact_rep().
ℹ In file 'utils.c' at line 897.
ℹ This is an internal error that was detected in the vctrs package.
Please report it at https://github.com/r-lib/vctrs/issues with a reprex (https://tidyverse.org/help/) and the full backtrace.
Backtrace:

  1. ├─base (local) <fn>(x)
  2. ├─ggplot2:::print.ggplot(x)
  3. │ ├─ggplot2::ggplot_build(x)
  4. │ └─ggplot2:::ggplot_build.ggplot(x)
  5. │ └─layout$setup(data, plot$data, plot$plot_env)
  6. │ └─ggplot2 (local) setup(..., self = self)
  7. │ └─self$facet$compute_layout(data, self$facet_params)
  8. │ └─ggplot2 (local) compute_layout(..., self = self)
  9. │ └─ggplot2::combine_vars(data, params$plot_env, vars, drop = params$drop)
  10. │ ├─ggplot2:::unique0(vec_rbind0(!!!values[has_all]))
  11. │ └─ggplot2:::vec_rbind0(!!!values[has_all])
  12. │ ├─ggplot2:::with_ordered_restart(...)
  13. │ │ └─base::withCallingHandlers(...)
  14. │ └─vctrs::vec_rbind(..., .error_call = .error_call)
  15. └─rlang:::stop_internal_c_lib(...)
  16. └─rlang::abort(message, call = call, .internal = TRUE, .frame = frame)
    Execution halted

Could you please turn this into a self-contained reprex (short for minimal reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.

If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page.

You can install reprex by running (you may already have it, though, if you have the tidyverse package installed):

install.packages("reprex")

Thanks

Hi I have the same issue. I tried "install.package(""

Could you please turn this into a self-contained reprex (short for minimal reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.

If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page.

You can install reprex by running (you may already have it, though, if you have the tidyverse package installed):

install.packages("reprex")

Thanks

I have the same issue. I installed "reprex". It still showed "error" as below: @DavisVaughan
`library(reprex)

ggplot(ggdf, aes(x = expression, color = condition,
group = sample_id)) +
geom_density() +
facet_wrap(~ antigen, nrow = 4, scales = "free") +
theme_bw() +
theme(axis.text.x = element_text(angle = 90, hjust = 1),
strip.text = element_text(size = 7), axis.text = element_text(size = 5)) +
guides(color = guide_legend(ncol = 1)) +
scale_color_manual(values = color_condition)
Error in vec_rbind():
! Negative n in compact_rep().
ℹ In file utils.c at line 897.
ℹ This is an internal error that was detected in the vctrs package.
Please report it at https://github.com/r-lib/vctrs/issues with a reprex and the full backtrace.
Backtrace:

  1. ├─base (local) <fn>(x)
  2. ├─ggplot2:::print.ggplot(x)
  3. │ ├─ggplot2::ggplot_build(x)
  4. │ └─ggplot2:::ggplot_build.ggplot(x)
  5. │ └─layout$setup(data, plot$data, plot$plot_env)
  6. │ └─ggplot2 (local) setup(..., self = self)
  7. │ └─self$facet$compute_layout(data, self$facet_params)
  8. │ └─ggplot2 (local) compute_layout(..., self = self)
  9. │ └─ggplot2::combine_vars(data, params$plot_env, vars, drop = params$drop)
  10. │ ├─ggplot2:::unique0(vec_rbind0(!!!values[has_all]))
  11. │ └─ggplot2:::vec_rbind0(!!!values[has_all])
  12. │ ├─ggplot2:::with_ordered_restart(...)
  13. │ │ └─base::withCallingHandlers(...)
  14. │ └─vctrs::vec_rbind(..., .error_call = .error_call)
  15. └─rlang:::stop_internal_c_lib(...)
  16. └─rlang::abort(message, call = call, .internal = TRUE, .frame = frame)
    `