| add_hill_params | R Documentation |
Create or add to the 'hill_params' table in a GeoTox database.
add_hill_params(GT, hill_params)
GT |
GeoTox object. |
hill_params |
List output from |
The same GeoTox object, invisibly.
fit_hill()
# Example Hill model data
hill_df <- tibble::tribble(
~assay, ~model, ~casn, ~logc, ~resp,
"a1", "human", "00-00-1", 0, 10,
"a1", "human", "00-00-1", 1, 20,
"a1", "human", "00-00-1", 2, 80,
"a1", "human", "00-00-1", 3, 100,
"a1", "human", "00-00-2", -0.5, 5,
"a1", "human", "00-00-2", 0.5, 20,
"a1", "human", "00-00-2", 1.5, 55,
"a1", "human", "00-00-2", 2.5, 60,
"a2", "rat", "00-00-1", -1, 0,
"a2", "rat", "00-00-1", 0, 10,
"a2", "rat", "00-00-1", 1, 30,
"a2", "rat", "00-00-1", 2, 40
)
hill_params <- fit_hill(
hill_df, assay = c(name = "assay", model = "model"), substance = "casn"
)
# Add Hill model parameters to GeoTox database
GT <- GeoTox() |> add_hill_params(hill_params)
# Open a connection to GeoTox database
con <- get_con(GT)
# Look at created tables
dplyr::tbl(con, "hill_params") |> dplyr::collect()
dplyr::tbl(con, "assay") |> dplyr::collect()
dplyr::tbl(con, "substance") |> dplyr::collect()
# Clean up example
DBI::dbDisconnect(con)
file.remove(GT$db_info$dbdir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.