【R】biogrowth
2021年9月2日
					1. はじめに
biogrowthは、微生物の成長モデルを扱うパッケージです。
2. インストール
CRANからインストールできます。
install.packages("biogrowth")
3. つかってみる
library(biogrowth) library(tidyverse) my_model <- "modGompertz" my_pars <- list(logN0 = 2, C = 6, mu = .2, lambda = 25) my_time <- seq(0, 100, length = 1000) static_prediction <- predict_isothermal_growth(my_model, my_time, my_pars) plot(static_prediction)

my_conditions <- tibble(time = c(0, 5, 40),
                        temperature = c(20, 30, 35),
                        pH = c(7, 6.5, 5)
)
my_primary <- list(mu_opt = 2,
                   Nmax = 1e8,
                   N0 = 1e0,
                   Q0 = 1e-3)
sec_temperature <- list(model = "Zwietering",
                        xmin = 25,
                        xopt = 35,
                        n = 1)
sec_pH = list(model = "CPM",
              xmin = 5.5,
              xopt = 6.5,
              xmax = 7.5,
              n = 2)
my_secondary <- list(
  temperature = sec_temperature,
  pH = sec_pH
)
my_times <- seq(0, 50, length = 1000)
dynamic_prediction <- predict_dynamic_growth(my_times,
                                             my_conditions, my_primary,
                                             my_secondary)
plot(dynamic_prediction, 
     add_factor = "temperature",
     line_col = "blue")

4. さいごに
微生物のことは分かりませんが、便利そうなパッケージです。