R/shorten.R

shorten = function(x, sep = ".", ini = 1, n = 3)
{
	abrev = function(x = x, sep = sep, i = ini, f = n)
	{
		y = unlist(strsplit(x, " "))
		z = substring(y, i, f)
		w = concatena(z, sep = sep)
		return(w)
	}#end function abrev
	
	return(sapply(x, abrev, sep = sep))
}#end function shorten
salah31416/toolbox documentation built on June 3, 2019, 6:59 p.m.