Last active
November 8, 2018 10:53
-
-
Save padpadpadpad/e3b1942becb909aa75b3c3f60a71428d to your computer and use it in GitHub Desktop.
function for working out dilutions for stock solutions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # stock sol vol 2 | |
| # stock_sol_conc is the concentration of the stock solution - current OD | |
| # new_sol_conc is the concentration of the new solution - the desired OD | |
| # diluent vol is the volume of the diluent you want to use (i.e. the amount of water/M9) | |
| stock_sol_vol2 <- function (stock_sol_conc, new_sol_conc, diluent_vol) | |
| { | |
| return((new_sol_conc * diluent_vol)/(stock_sol_conc - new_sol_conc)) | |
| } | |
| stock_sol_vol2(0.2, 0.1, 200) | |
| stock_sol_vol2(0.5, 0.1, 200) | |
| stock_sol_vol2(1.2, 0.1, 200) | |
| stock_sol_vol2(c(1.2, 0.8, 0.5), 0.1, 200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment