Suggest {markdown} for md_convert() only
k5cents opened this issue · 0 comments
k5cents commented
The md_convert()
function isn't really a user-facing function that fits with the rest of the package (mostly used in testing). So, why not simply suggest the markdown
package and then follow the R Packages book advice and just return an error.
# You need the suggested package for this function
my_fun <- function(a, b) {
if (!requireNamespace("pkg", quietly = TRUE)) {
stop("Package \"pkg\" needed for this function to work. Please install it.",
call. = FALSE)
}
}