`Tplyr:::modify_nested_call()` fails if Tplyr is not loaded
mstackhouse opened this issue · comments
This arose from reverse dependency failures in safetyCharts. The following code will fail if Tplyr isn't loaded:
Tplyr::tplyr_table(safetyData::adam_adsl, TRT01P) %>%
Tplyr::add_layer(
Tplyr::group_count(RACE)
) %>%
Tplyr::build()
Error in as.environment(pos) :
no item called "package:Tplyr" on the search list
This is because of a call to objects("package:Tplyr")
which is looking at namespaces on the search path. This can be avoided by using getNamespaceExports("Tplyr")
instead.