kivanvan / ipolygrowth

Bacterial Growth Curve Parameters from Polynomial Model
GNU General Public License v3.0
0 stars 0 forks source link

Error when fitting. Any idea why? #4

Open kaydadaemon opened 1 month ago

kaydadaemon commented 1 month ago

Error in dplyr::mutate(): ℹ In argument: fit = stats::predict(curve). ℹ In group 1: Well = G7. Caused by error: ! fit must be size 373 or 1, not 2238. Run rlang::last_trace() to see where the error occurred.

rlang::last_trace() <error/dplyr:::mutate_error> Error in dplyr::mutate(): ℹ In argument: fit = stats::predict(curve). ℹ In group 1: Well = G7. Caused by error: ! fit must be size 373 or 1, not 2238.

Backtrace: ▆

  1. ├─ipolygrowth::ipg_multisample(...)
  2. │ ├─base::tryCatch(...)
  3. │ ├─base::suppressMessages(...)
  4. │ │ └─base::withCallingHandlers(...)
  5. │ └─ipolygrowth::ipg_singlesample(...)
  6. │ └─... %>% dplyr::mutate(diffOD = c(0, diff(fit, lag = 1)))
  7. ├─dplyr::mutate(., diffOD = c(0, diff(fit, lag = 1)))
  8. ├─dplyr::distinct(.)
  9. ├─dplyr::select(., time, fit)
  10. ├─dplyr::mutate(., fit = stats::predict(curve))
  11. ├─dplyr:::mutate.data.frame(., fit = stats::predict(curve))
  12. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  13. │ ├─base::withCallingHandlers(...)
  14. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
  15. │ └─mask$eval_all_mutate(quo)
  16. │ └─dplyr (local) eval()
  17. └─dplyr:::dplyr_internal_error(...) Run rlang::last_trace(drop = FALSE) to see 5 hidden frames.
kivanvan commented 1 month ago

Hi! Thanks for your question. Can you provide a reproducible example so that I can test it on my end?