Skip to contents

The hits_summary_DT (DT option) and hits_summary (data frame option) functions create tables information on the number of hit_threshold exceedances per site for each individual grouping. The table has one row per group per site that has hit_threshold exceedances. For example, if "Biological" is the category, and a site has EAR levels above the specified hit_threshold for "DNA Binding" and "Nuclear Receptors", that site will have 2 rows of data in this table.

Usage

hits_summary_DT(
  chemical_summary,
  category = "Biological",
  sum_logic = TRUE,
  hit_threshold = 0.1
)

hits_summary(chemical_summary, category, hit_threshold = 0.1, sum_logic = TRUE)

Arguments

chemical_summary

Data frame from get_chemical_summary.

category

Character. Either "Biological", "Chemical Class", or "Chemical".

sum_logic

Logical. TRUE sums the EARs in a specified grouping, FALSE does not. FALSE may be better for traditional benchmarks as opposed to ToxCast benchmarks.

hit_threshold

Numeric threshold defining a "hit".

Value

data frame with with one row per unique site/category combination. The columns are site, category, Samples with Hits, and Number of Samples.

data frame with columns "Hits per Sample", "Individual Hits", "nSample", "site", and "category"

Details

For each row, there are 4 columns. Site and category (as defined by the category argument) define the row. "Samples with hits" are how many samples exceeded the hit_threshold for the specified category at the specified site. "Number of Samples" indicates how many samples were collected at an individual site based on unique date.

The tables contain slightly different results for evaluation of a single site. There are three columns (the Site column is dropped), and rather than one row per site/category, there is one row per category.

Examples

# This is the example workflow:
path_to_tox <- system.file("extdata", package = "toxEval")
file_name <- "OWC_data_fromSup.xlsx"

full_path <- file.path(path_to_tox, file_name)

tox_list <- create_toxEval(full_path)

ACC <- get_ACC(tox_list$chem_info$CAS)
ACC <- remove_flags(ACC)

cleaned_ep <- clean_endPoint_info(end_point_info)
filtered_ep <- filter_groups(cleaned_ep)
chemical_summary <- get_chemical_summary(tox_list, ACC, filtered_ep)

stats_group <- hits_summary(chemical_summary, "Biological")

hits_summary_DT(chemical_summary, category = "Biological")
hits_summary_DT(chemical_summary, category = "Chemical Class")
hits_summary_DT(chemical_summary, category = "Chemical")