Skip to contents

Walks through the DM state object to see if there are any datasets available

Usage

DM_hasds(state)

Arguments

state

DM state from DM_fetch_state()

Value

Logical TRUE if there is a dataset or FALSE otherwise.

Examples

sess_res = DM_test_mksession()
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → ASM:   dest:   file.path("config","report.docx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → ASM:   dest:   file.path("config","report.pptx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → ASM:   dest:   file.path("config","report.yaml")
#> → ASM: State initialized
#> → ASM: setting word placeholders: 
#> → ASM:   -> setting docx ph: HEADERLEFT = left header
#> → ASM:   -> setting docx ph: HEADERRIGHT = right header
#> → ASM:   -> setting docx ph: FOOTERLEFT = left footer
#> → ASM: module isgood: TRUE
#> → DM: including file
#> → DM:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → DM:   dest:   file.path("config","report.docx")
#> → DM: including file
#> → DM:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → DM:   dest:   file.path("config","report.pptx")
#> → DM: including file
#> → DM:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → DM:   dest:   file.path("config","report.yaml")
#> → DM: module checksum updated: f280116ab6b4488df6de76aff513a83f
#> → DM: State initialized
#> → DM: ds checksum updated: 641fcbc6616d24d05acded4317a3bb12
#> → DM: module checksum updated: 78099100dae67cc0fee50517ea72a920
#> → DM: adding preload sources
#> → DM:  - file added: TEST_DATA.xlsx
#> → DM: added: TEST_DATA.xlsx
#> → DM:  - url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_PC.csv
#> → DM: url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_PC.csv
#> → DM:  - url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_EX.csv
#> → DM: url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_EX.csv
#> → DM:  - url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_DM.csv
#> → DM: url added: https://raw.githubusercontent.com/john-harrold/formods/refs/heads/master/inst/test_data/SDTM_DM.csv
#> → DM: loading element idx: 1
#> → DM: ds checksum updated: 661d99b693b9095f479a8054aa16a7a3
#> → DM: module checksum updated: 884ce9dd627a6f64da8207713d697e3a
#> → DM: added element idx: 1
#> → DM: loading element idx: 2
#> → DM: ds checksum updated: e66c9d8c85666c3be2d797912d076571
#> → DM: module checksum updated: c7bae9d5767e1e6011a4c61ea40f8c1a
#> → DM: added element idx: 2
#> → DM: loading element idx: 3
#> → DM: ds checksum updated: 2f4932ded2e169053c7076467c096989
#> → DM: module checksum updated: c5fbd7f1d80a68008a29d8ccdefbff24
#> → DM: added element idx: 3
#> → DM: loading element idx: 4
#> → DM: ds checksum updated: 245e2d33e46c19891c1cddb9638be4b3
#> → DM: module checksum updated: 3bf49cf9dcf830b8898b779f209da16b
#> → DM: added element idx: 4
#> → DM: module isgood: TRUE
#> → # preload_complete is good: TRUE ------------------------------------------
state = sess_res[["state"]]
DM_hasds(state)
#> [1] TRUE