powered by
Returns the position of the nth occurrence of str2 in str1. Returns 0 if str2 is not found
instr(str1, str2, startpos = 1, n = 1)
main string in which str2 is to be found
substring contained in str1
starting position in str1; default is 1
which occurrence is to be found; default is 1
number representing the nth position of str2 in str1
# NOT RUN { library(survPen) instr("character test to find the position of the third letter r","r",n=3) # }
Run the code above in your browser using DataLab