Compose URL to PDF
compose_url.Rd
Compose URL to TRS PDF for a JECFA report. Valid URLs are
constructed based on the JECFA data frame information, i.e,
they should report "NOT FAS" or "NOT PREPARED" in the
Tox_monograph_abbr
column and have a valid URL in the
Report_sourcelink
column.
Examples
library(jecfa)
jecfa_sample <- c(1, 10) |>
purrr::map(\(id) compose_jecfa_list(id) |> get_result()) |>
create_df() |>
process_df() |>
add_metadata()
jecfa_sample[["ref_id"]][[1]] |> # report 1 has no TRS PDF
compose_url(jecfa_sample)
#> Warning: Condition not satisfied, skipping...
#> NULL
jecfa_sample[["ref_id"]][[2]] |> # report 10 has a TRS PDF
compose_url(jecfa_sample)
#> $url
#> [1] "http://apps.who.int/iris/bitstream/10665/41962/1/WHO_TRS_868.pdf"
#>
#> $fnm
#> 2-TRS_868.pdf
#>
#> $fnm_noid
#> TRS_868.pdf
#>