0

So in Rstudio I have the following code:

DMSO_TNFa_Gaussian_fit_DF<-ddply(kek, c("Well_m",'cell'), function(x)Gaussian_fit(x,a1=0.06460553,m1=42,s1=3,a2=0.04731144,m2=150,s2=3,a3=0.04174895,m3=243,s3=3,a4=0.045,m4=350,s4=3))

The ddply function fits every cell per Well using the Gaussian fit function.

Some cells cant be fitted by the function, thus it stops running. I want it to continue to/with the next cell if a cell cant be fitted.

How do I achieve this?

Gregor Thomas
  • 136,190
  • 20
  • 167
  • 294
B.Omar
  • 1
  • Suggested duplicate: [Tell lapply to ignore error and process the next item in the list](https://stackoverflow.com/q/2589275/903061) – Gregor Thomas Aug 09 '18 at 19:01
  • As suggested in comments at the duplicate, since you're using `plyr` already you could use `plyr::failwith` instead of the slightly more cumbersome `tryCatch` approach. – Gregor Thomas Aug 09 '18 at 19:03

0 Answers0