Utility functions to treat characters
Function %+% paste characters with other characters pairwise.
Function %n% is used to repeat a character n time.
Function numtostr converts numeric to a string in a nice
format.
x %+% y x %n% y numtostr(x,nch,digits=4)
x |
Character vector or a numeric vector for |
y |
Character vector |
nch |
(Optionnal) length of the resulting character vector |
digits |
Number of digits in the resulting strings |
Function %+% is an operator that shortens paste(x, y,
sep="") see help(paste) for more options. Function
%n% returns the character vector x repeated y times. If both x and
y are vector each element of x are applied to each element of y.
Function numtostr converts numerical vector to a character
vector using a nice format.
Charles-Édouard Giguère
require(CUFF)
"Hello " %+% "world."
cat(" " %n% c(rep(1,9),2) %+% 1:10,fill=TRUE)
### Returns a * because specified length of character is unsufficient.
numtostr(9048948449.94948,nch=8)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.