substring in the way of pipe operator
x %s% yz
x | Vector or NULL, values to be substringed |
---|---|
y.z | A character or 0.digit to call substr |
A string or NULL
This functions is a pipe version of substr
'NFKA008' %s% '1.4'#> [1] "NFKA"'NFKA008' %s% .4#> [1] "NFKA"'where is' % % ('the pig is in the cornfield' %s% '1.7') %+% '?'#> [1] "where is the pig?"'NFKA008' %s% 5.7#> [1] "008"