R/bracket.R

`bracket` <-
function(x,close=FALSE,...)sub(
	'(^</[^ ]+) .+>$',
	'\\1>',
	do.call(
		paste,
		c(
			list(
				sep='',
				'<',
				ifelse(close, '/' , ''),
				x
			),
			lapply(names(list(...)),function(x)attribute(list(...)[[x]],tag=x)),
			list(
				'>'
			)
		)
	)
)

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.