I am trying to plot a Gompertz growth model using grofit. However, ylim in plot() for grofit package is not working. How can I fix it? The code I am using is:
It would be helpful to see an example of the graph that your plot command generates. Also, does the plot command give an error message, if so, then please post it here?
You can find attached an example. Plot command doesn't give error messages. But, I can't change the y-axis scale from 0-0.70 to 0-1.0 using ylim = c(0,1). Do you have any idea how can I do it?
have you tried these suggestions on stackexchange? https://stackoverflow.com/questions/10595119/r-ylim-and-xlab-ylab-in-plot-for-grofit-package-not-working
in addition, the grofit package seems to have been removed from cran, so I would at least be careful using it (https://cran.r-project.org/web/packages/grofit/index.html)
The issue you are facing is that in your plot command you are providing the gcFit object as the object to be plotted. R recongnises this and so does not call the base R plot command. R is instead actually calling the plot.gcFit command in the background from within the grofit package.
Having had a look at the help files for the grofit package, it appears that while you can specify plotting parameters such as ylim, the plot.gcFit command accepts it, but does not do anything with it. Hence, no error message, but also no change in your graph. Specifically, the help file for plot.gcFit states - "Other graphical parameters may also passed as arguments. This has currently no effect and is only meant to fulfill the requirements of a generic function".
So your best option, if you still want to reassign the y-axis range, is to extract the relevant output from the gcFit object within your TestRun1 object, and then use base R plotting commands to create your graph.
It makes sense, but I don't know how to programme it. Do you have any idea for commands lines to do it? Or do you other function to fit Gompertz models?