if(requireNamespace("dplyr"))
{
assert_is_tbl_df(dplyr::tbl_df(data.frame(x = 1:5)))
#These examples should fail.
assertive.base::dont_stop(assert_is_tbl(data.frame(x = 1:5)))
} else
{
message("This example requires the data.table package to be installed.")
}
Run the code above in your browser using DataLab