R/safeQuote.R

safeQuote <- function(x){
	hasSpace <- contains(" ", x)
	isQuoted <- contains("^[\"']", x)
	need <- hasSpace & !isQuoted
	x[need] <- glue("'", x[need], "'")
	x
}

    

Try the metrumrg package in your browser

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

metrumrg documentation built on May 2, 2019, 5:55 p.m.