Compose URLs
compose_urls.Rd
Compose URLs to TRS PDFs for JECFA reports. 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.
Value
a list with the URLs specification for each JECFA report, i.e., a list with the URL, the filename with the ID and the filename without the ID
Examples
library(jecfa)
# first element will be NULL because report 1 has no PDF, while
# record 2 has a PDF so it will be a list with the URL, the filename
# with the ID and the filename without the ID.
c(1, 10) |>
purrr::map(\(id) compose_jecfa_list(id) |> get_result()) |>
create_df() |>
process_df() |>
add_metadata() |>
compose_urls()
#> Warning: Condition not satisfied, skipping...
#> [[1]]
#> NULL
#>
#> [[2]]
#> [[2]]$url
#> [1] "http://apps.who.int/iris/bitstream/10665/41962/1/WHO_TRS_868.pdf"
#>
#> [[2]]$fnm
#> 2-TRS_868.pdf
#>
#> [[2]]$fnm_noid
#> TRS_868.pdf
#>
#>