I think it would be neat to have the calibration curve details encapsulated into one single R object.
We can have a list with a special S3 class, i.e. calibration_curve. This list would have all the details pertaining the calibration curve:
Data used in the calibration curve
Regression details
Other details
How to approach this?
Perhaps create a new function named create_calibration_curve() that takes in the calibration data, and returns said R object that would be a list with the S3 class calibration_curve, see: https://adv-r.hadley.nz/s3.html#s3-classes.
Then we could pass this calibration curve object as one single argument to functions that need to use it, such as the function to make estimates of protein concentrations.
Hi @lsilvam:
I think it would be neat to have the calibration curve details encapsulated into one single R object.
We can have a list with a special S3 class, i.e.
calibration_curve
. This list would have all the details pertaining the calibration curve:How to approach this?
Perhaps create a new function named
create_calibration_curve()
that takes in the calibration data, and returns said R object that would be a list with the S3 classcalibration_curve
, see: https://adv-r.hadley.nz/s3.html#s3-classes.We could use tidymodels to create the elements of the calibration curve object: https://www.tidymodels.org/learn/statistics/tidy-analysis/#regression-models.
Then we could pass this calibration curve object as one single argument to functions that need to use it, such as the function to make estimates of protein concentrations.