tests/testthat/helper-stringr.R

str_view <- function(...) {
	skip_if_not_installed('stringr')
	skip_if_not_installed('htmlwidgets')
	
	if (packageVersion("stringr") >= "1.4.1.9000") {
		stringr::str_view(..., html = TRUE)
	} else {
		stringr::str_view(...)
	}
}

Try the repr package in your browser

Any scripts or data that you put into this service are public.

repr documentation built on Feb. 16, 2023, 6:57 p.m.