Collects one or more datasets into a validated, named collection - the
single entry point through which ssd_define_scenario() takes dataset
input. Each dataset must carry a numeric Conc column (the species
sensitivity distribution convention); additional columns are preserved.
Details
Names are taken from the argument names where supplied, otherwise derived
from the argument expression by symbol capture (e.g. ssddata::ccme_boron
becomes "ccme_boron"). A literal with no derivable name (e.g. a bare
data.frame(...) call) must be given an explicit name.
ssd_data() is intended to grow: the planned scenario-input-types change
(see TARGETS-DESIGN.md section 12) will let each input also be one of the data
generators ssd_run_scenario() accepts today - a fitdists or tmbfit
object, a generator function, or a function-name string - with the data
materialised by the dataset registry. For now each input must be a data
frame.
Examples
ssd_data(ssddata::ccme_boron)
#> $ccme_boron
#> # A tibble: 28 × 5
#> Chemical Species Conc Group Units
#> <chr> <chr> <dbl> <fct> <chr>
#> 1 Boron Oncorhynchus mykiss 2.1 Fish mg/L
#> 2 Boron Ictalurus punctatus 2.4 Fish mg/L
#> 3 Boron Micropterus salmoides 4.1 Fish mg/L
#> 4 Boron Brachydanio rerio 10 Fish mg/L
#> 5 Boron Carassius auratus 15.6 Fish mg/L
#> 6 Boron Pimephales promelas 18.3 Fish mg/L
#> 7 Boron Daphnia magna 6 Invertebrate mg/L
#> 8 Boron Opercularia bimarginata 10 Invertebrate mg/L
#> 9 Boron Ceriodaphnia dubia 13.4 Invertebrate mg/L
#> 10 Boron Entosiphon sulcatum 15 Invertebrate mg/L
#> # ℹ 18 more rows
#>
#> attr(,"class")
#> [1] "ssdsims_data"
ssd_data(boron = ssddata::ccme_boron, cadmium = ssddata::ccme_cadmium)
#> $boron
#> # A tibble: 28 × 5
#> Chemical Species Conc Group Units
#> <chr> <chr> <dbl> <fct> <chr>
#> 1 Boron Oncorhynchus mykiss 2.1 Fish mg/L
#> 2 Boron Ictalurus punctatus 2.4 Fish mg/L
#> 3 Boron Micropterus salmoides 4.1 Fish mg/L
#> 4 Boron Brachydanio rerio 10 Fish mg/L
#> 5 Boron Carassius auratus 15.6 Fish mg/L
#> 6 Boron Pimephales promelas 18.3 Fish mg/L
#> 7 Boron Daphnia magna 6 Invertebrate mg/L
#> 8 Boron Opercularia bimarginata 10 Invertebrate mg/L
#> 9 Boron Ceriodaphnia dubia 13.4 Invertebrate mg/L
#> 10 Boron Entosiphon sulcatum 15 Invertebrate mg/L
#> # ℹ 18 more rows
#>
#> $cadmium
#> # A tibble: 36 × 5
#> Chemical Species Conc Group Units
#> <chr> <chr> <dbl> <fct> <chr>
#> 1 Cadmium Oncorhynchus mykiss 0.23 Fish ug/L
#> 2 Cadmium Salvelinus confluentus 0.83 Fish ug/L
#> 3 Cadmium Cottus bairdi 0.96 Fish ug/L
#> 4 Cadmium Salmo salar 0.99 Fish ug/L
#> 5 Cadmium Acipenser transmontanus 1.14 Fish ug/L
#> 6 Cadmium Prosopium williamsoni 1.25 Fish ug/L
#> 7 Cadmium Salmo trutta 1.36 Fish ug/L
#> 8 Cadmium Salvelinus fontinalis 2.23 Fish ug/L
#> 9 Cadmium Oncorhynchus tshawytscha 2.29 Fish ug/L
#> 10 Cadmium Pimephales promelas 2.36 Fish ug/L
#> # ℹ 26 more rows
#>
#> attr(,"class")
#> [1] "ssdsims_data"